BanlioJoin Date: 2014-03-28 Post Count: 35 |
script.Parent.Touched:connect(function(TestingPart)
--h = game.Workspace.TestingPartScript.Parent:findFirstChild("Humanoid")
local humanoid = part.Parent:findFirstChild("Humanoid")
if h then
wait (1)
game.StarterGui.ScreenGui.TextLabel.Visible = true
wait(1)
game.StarterGui.ScreenGui.TextLabel.Text = "I am behind you!"
--game.StarterGui.ScreenGui.Test.Sound:play()
wait(1)
game.StarterGui.TextLabel.Visible = false
end
end) |
|
|
Could you explain with more detail the problem you're having with the script?. |
|
|
I don't know, what IS wrong with it?
We can't fix something without knowing the error.
Is it not running? Is something not showing up? Please do tell. |
|
BanlioJoin Date: 2014-03-28 Post Count: 35 |
Not showing up.
I also did this, but you can't make Locals stand for something.
script.Parent.Touched:connect(function(TestingPart)
--h = game.Workspace.TestingPartScript.Parent:findFirstChild("Humanoid")
h =local humanoid = part.Parent:findFirstChild("Humanoid")
if h then
wait (1)
game.StarterGui.ScreenGui.TextLabel.Visible = true
wait(1)
game.StarterGui.ScreenGui.TextLabel.Text = "I am behind you!"
--game.StarterGui.ScreenGui.Test.Sound:play()
wait(1)
game.StarterGui.TextLabel.Visible = false
end
end) |
|
wish_zJoin Date: 2009-02-11 Post Count: 15392 |
it updates the startergui instead of the playergui. |
|
|
Add a variable to find the player in "Players" and change game.Starter to Player.PlayerGui and inform us of the result. |
|
TypocriteJoin Date: 2013-08-28 Post Count: 6856 |
Why are there 2 lines that are commented out?
Remove the "--"'s |
|
BanlioJoin Date: 2014-03-28 Post Count: 35 |
still isn't working. |
|
|
script.Parent.Touched:connect(function(part)
local humanoid = part.Parent:findFirstChild("Humanoid")
if h then
wait (1)
character = part.Parent
player = game.Players:GetPlayerFromCharacter(character)
player.ScreenGui.TextLabel.Visible = true
player.ScreenGui.TextLabel.Text = "I am behind you!"
wait(1)
player.TextLabel.Visible = false
end
end) |
|
|
Change player.ScreenGui to,
player.PlayerGui.ScreenGui |
|
|
BanlioJoin Date: 2014-03-28 Post Count: 35 |
it doesn't work I want the local to stand for h |
|
BanlioJoin Date: 2014-03-28 Post Count: 35 |
I also tried this. But doesn't work and ice that script doesn't work.
script.Parent.Touched:connect(function(part)
local humanoid = part.Parent:findFirstChild("Humanoid")
if humanoid then
wait (1)
character = part.Parent
player = game.Players:GetPlayerFromCharacter(character)
player.ScreenGui.TextLabel.Visible = true
player.ScreenGui.TextLabel.Text = "I am behind you!"
wait(1)
player.TextLabel.Visible = false
end
end)
Is it this?
No right? |
|
SasayakiJoin Date: 2007-06-29 Post Count: 33868 |
script.Parent.Touched:connect(function(part)
local humanoid = part.Parent:findFirstChild("Humanoid")
if humanoid then
wait (1)
character = part.Parent
player = game.Players:GetPlayerFromCharacter(character)
if player then
player.PlayerGui.ScreenGui.TextLabel.Visible = true
player.PlayerGui.ScreenGui.TextLabel.Text = "I am behind you!"
wait(1)
player.PlayerGui.ScreenGui.TextLabel.Visible = false
end
end
end) |
|