|
| 15 Jun 2017 07:21 PM |
When someone steps on it I want the part that stepped on it to be put in message form then delete it self after 3 seconds
Leg =script.Parent
Leg.Touched:connect(function(Blox) print(Blox) local m =Instance.new("Message", workspace) m.Text(Blox) wait(3) m:Remove() end)
|
|
|
| Report Abuse |
|
|
| |
|
|
| 15 Jun 2017 07:28 PM |
Leg =script.Parent
Leg.Touched:connect(function(Blox) print(Blox) local m =Instance.new("Message", workspace) m.Text = Blox.Name wait(3) m:Remove() end)
|
|
|
| Report Abuse |
|
|
|
| 15 Jun 2017 07:31 PM |
However, I do think you should put a debounce variable because if you step on it, it will fill up your screen with messages. You might want to do it one at a time.
Leg =script.Parent debounce = false Leg.Touched:connect(function(Blox) if debounce then return else debounce = true print(Blox) local m =Instance.new("Message", workspace) m.Text = Blox.Name wait(3) m:Remove() end debounce = false end) |
|
|
| Report Abuse |
|
|
|
| 15 Jun 2017 07:54 PM |
| this wont fix it but use Destroy, not remove |
|
|
| Report Abuse |
|
|
|
| 15 Jun 2017 07:55 PM |
| True, Remove is deprecated. Use Destroy. |
|
|
| Report Abuse |
|
|