|
| 21 Jul 2017 04:41 PM |
i want it to delete if a player touches it
deb = false script.Parent.Touched:connect(function(part) if game.Players:FindFirstChild(part.Parent.Name) then if deb == false then deb = true local plr = game.ServerStorage.PlayerMoney:FindFirstChild(part.Parent.Name) script.Parent.BrickColor = BrickColor.new("Bright red") plr.Value = plr.Value + script.Parent.Parent.Amount.Value wait(script.Parent.Parent.TimeToWait.Value) deb = false script.Parent.BrickColor = BrickColor.new("Bright green") end end end) function touch() if game.Players:GetPlayerFromCharacter(hit.Parent)
script.Parent:remove() end
script.Parent.Touched:connect(touch) |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Jul 2017 07:22 PM |
Want it to delete when a player touch it?
script.Parent:Destroy()
|
|
|
| Report Abuse |
|
|
|
| 21 Jul 2017 07:23 PM |
Yea use script.Parent:Destroy() not script.Parent:remove()
Yours Truly, MetalPig2002 |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2017 07:34 PM |
| Figured i out on my own hours ago. Nice try laddies. |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2017 07:46 PM |
| "Nice try", seems like you tried too hard. |
|
|
| Report Abuse |
|
|
| |
|