|
I know its against the rules to ask for scripts but I have a question. I keep trying to make a message pop up when you touch a brick, but I cant find out how, I have tried different tests, but it wont work. Can anyone help me? |
|
|
script.Parent.Touched:connect(function(hit)
if not hit.Parent or hit.Name == "Paintball" then return end
if hit.Parent:findFirstChild("Humanoid") then
player = game.Players:GetPlayerFromCharacter(hit.Parent)
m = Instance.new("Message", player)
m.Text = "Hi! Im bob!"
wait(3)
m:remove()
end
end) |
|
|
Define message. Like, the message that covers yoru screen?
Or do you mean a GUI?
Or a humanoid bubble? |
|
|
Its a little fog square that appears on the top left hand corner. |
|
|
A message that covers the screen. Can you add comments. Im kinda new to scripting and I need a little extra support |
|
|
You want it to cover the screen? Well then that'll be showned to everyone, correct? |
|
|
function onTouched()
m=Instance.new("Message")
m.Parent=game.Workspace
m.Text="INSERTTEXTHERE"
end
script.Parent.Touched:connect(onTouched) |
|
|
EmessJoin Date: 2010-04-01 Post Count: 13331 |
You can't cover the screen with a message that is viewable to only one person, but however message is deprecated and it is suggested that you use Gui instead. |
|
|
Wouldnt I need to add the brick name anywhere? And would I put the script in the brik? Or in workspace? |
|
|
You try it. Thats the most unefficent question i ever saw. |
|
EmessJoin Date: 2010-04-01 Post Count: 13331 |
If you put a Message in Workspace, the Message will be viewed to everyone. |
|
domos666Join Date: 2009-07-18 Post Count: 123 |
You should put the script in the brick... |
|