Problems that wrong:
You did wrong some problems. Firstly, yep, I think everyone knows, you WASN'T CALL THE FUNCTION.
Second, @TTChaos have already commented at your question, 'Hint' is deprecated and you should use TextLabel.
Third, as important, you need "ClickDetector". That will fire an event called 'MouseClick' when you clicked.
The way to fix the problems:
You must delete the line 3. 'Hint' is deprecated, and enter a "ClickDetector" inside the part. And insert a "TextLabel" into the StarterGui.ScreenGui (You don't need to change any names.)
Script:
local click = script.Parent.ClickDetector
function OnClicked(plr)
local wait-time = 5
local text = game.StarterGui.ScreenGui.TextLabel
text.Visible = true
text.Text = "~TEXT~"
print(plr.Name .. "had clicked the part!")
print("Waiting for 5 seconds...")
wait(wait-time)
print("Done!")
text.Visible = false
end
click.MouseClick:Connect(OnClicked)
If you have any questions, comment below! I'll be happy to answer them :)
If this answer helped you, mark this as the answer! :3 Bye!
3 comments
Do you ever call the function?
Did you call the function??? I need more information on what you're trying to do here.
Hint is deprecated. With the introduction of Roblox’s GUI features hints have been deprecated and TextLabels should be used instead for new work. The TextLabel object offers a wide range of features for displaying and customizing text that hints do not.