Banlio
|
  |
| Joined: 28 Mar 2014 |
| Total Posts: 35 |
|
|
| 04 Jul 2014 07:36 PM |
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) |
|
|
| Report Abuse |
|
|
|
| 04 Jul 2014 07:38 PM |
| Could you explain with more detail the problem you're having with the script?. |
|
|
| Report Abuse |
|
|
|
| 04 Jul 2014 07:38 PM |
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. |
|
|
| Report Abuse |
|
|
Banlio
|
  |
| Joined: 28 Mar 2014 |
| Total Posts: 35 |
|
|
| 04 Jul 2014 07:39 PM |
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) |
|
|
| Report Abuse |
|
|
WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 04 Jul 2014 07:39 PM |
| it updates the startergui instead of the playergui. |
|
|
| Report Abuse |
|
|
|
| 04 Jul 2014 07:39 PM |
| Add a variable to find the player in "Players" and change game.Starter to Player.PlayerGui and inform us of the result. |
|
|
| Report Abuse |
|
|
Typocrite
|
  |
| Joined: 28 Aug 2013 |
| Total Posts: 6856 |
|
|
| 04 Jul 2014 07:41 PM |
Why are there 2 lines that are commented out?
Remove the "--"'s |
|
|
| Report Abuse |
|
|
Banlio
|
  |
| Joined: 28 Mar 2014 |
| Total Posts: 35 |
|
| |
|
|
| 04 Jul 2014 07:47 PM |
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) |
|
|
| Report Abuse |
|
|
|
| 04 Jul 2014 07:55 PM |
Change player.ScreenGui to, player.PlayerGui.ScreenGui |
|
|
| Report Abuse |
|
|
| |
|
Banlio
|
  |
| Joined: 28 Mar 2014 |
| Total Posts: 35 |
|
|
| 04 Jul 2014 11:36 PM |
| it doesn't work I want the local to stand for h |
|
|
| Report Abuse |
|
|
Banlio
|
  |
| Joined: 28 Mar 2014 |
| Total Posts: 35 |
|
|
| 05 Jul 2014 11:55 PM |
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? |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 05 Jul 2014 11:58 PM |
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) |
|
|
| Report Abuse |
|
|