|
| 04 May 2015 03:44 PM |
I need the text to update in the GUI when a part is touched; I made this:
function update(irrelevant) game.StarterGui.ScreenGui.TextLabel.Text = ("Story Line: Updated!") end
script.Parent.Touched:connect(update)
help? |
|
|
| Report Abuse |
|
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 04 May 2015 03:52 PM |
function onTouch(hit) local human = hit.Parent:FindFirstChild("Humanoid") local player = game.Players:GetPlayerFromCharacter(human.Parent) if human and player then player.PlayerGui.ScreenGui.TextLabel.Text = "Story Line: Updated!" end end
script.Parent.Touched:connect(onTouch) |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 04 May 2015 03:53 PM |
| You might also want to add a debounce. |
|
|
| Report Abuse |
|
|
|
| 04 May 2015 03:55 PM |
| I would rather use :FireClient for FilteringEnabled support. |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
| |
|
|
| 04 May 2015 04:07 PM |
| All people should start using FE. |
|
|
| Report Abuse |
|
|