Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i get my message to dissapear?

Asked by 9 years ago

So I'm making this game and at the end I put this huge brick and when you touch the brick it makes a message saying: "[player] has finished the game!" but I don't know how to fill in [player] with the player's name that touched it! ...Help?...

1 answer

Log in to vote
-1
Answered by 9 years ago

Here's the script you want. It needs to be inside a brick.

local m = Instance.new("Message")


function onTouch(hit)

name = hit.Parent.Name
m.Parent = game.Workspace
m.Text = ""..name.." has won the game!" 
wait(3)
m:remove()



end

script.Parent.Touched:connect(onTouch)
0
1. Don't give the user any "free" codes cause this isn't ScriptingMakers, and 2. Do a Walkthrough on how your script works. woodengop 1134 — 9y
Ad

Answer this question