I want to make a UI.TextLabel talk to you when you come in contact with a brick, possible for anybody to help fix my problem?
I have tried doing:
game.workspace.StarterGui.ScreenGui.TextLabel.Text = blah blah blah
and
game.StarterGui.ScreenGui.TextLabel.Text = blah blah blah
^
This has been the closest Ive gotten to attempting at fixing my problem, but never have it seem to work.
Im unsure if there is a bigger process to go by but if you have the solution, please tell me how to resolve this problem, thank you
If you want pictures I have some right here for you
script.Parent.Touched:Connect(funtion(hit)
Local Player = game.Players:FindFirstChild(hit.Parent.Name)
if Player then -- Here we checking if hit is a player
Player.PlayerGui.GUI.Enabled = true
end
end)
Change GUI to your name of GUI
I hope it’s help you
You can’t put local scripts in workspace. I’m gonna write you the code and explain it in a sec.
Nevermind imma work on my own stuff but you can do it like this:
Detect when the part gets hit, then fire a client event from a script inside that part. And then in a local script in the text label, detect when the client gets fired and do, script.parent.parent.visible = true I’m too lazy to do it lol