This question might be considered redundant, but it would help tons if you answer it.
I'm trying to script a brick that instances a message, except I don't want it in the Workspace - I only want the player who touched it to see it.
I already know that type of message has to be inside the Player of the character who touched it, but it never works out. Please help?
SCRIPT:
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
local debounce = true
if h~=nil and debounce == true then
debounce = false
local msg = Instance.new("Message")
msg.Text = "Insert some weird message heeere"
msg.Parent = game.Players[h.Parent.Name]
wait(5)
debounce = true
msg:remove()
end
end
script.Parent.Touched:connect(onTouched)
If you could help me, thanks!

1 comment
If your question was answered please click the 'accept answer' button!