Hello, thanks for your coming. My problem is that I am trying to change a text label when the player touches the part, but when the player touches the screen GUI will not change. I found out that the text will only change and refresh after the player dies. So what should I do?
basically what the comments said. Change the player player GUI. Then you would change the text from there. Such as:
1 | script.Parent.Touched:Connect( function (hit) |
2 | local player = game.Players:GetPlayerFromCharacter(hit.Parent) |
3 | if player then |
4 | player.PlayerGui.ScreenGui.TextLabel.Text = “Your Text Here” |
5 | end |
6 | end ) |