TheAlaska
|
  |
| Joined: 21 Jan 2011 |
| Total Posts: 152 |
|
|
| 20 Feb 2016 06:56 PM |
bin = script.Parent halt = false
function onButton1Down(mouse) local hit = mouse.Target local ThePlayer = script.Parent.Parent.Parent.Name local Player = game.Workspace[ThePlayer] local distance = (Player.Torso.Position-hit.Position).Magnitude
if (hit == nil) or (halt == true) then return end halt = true mouse.Icon = "rbxasset://textures\\GunWaitCursor.png" bin.Ping:play() if (hit.Name == "Sand") and distance < 25 then while hit.Transparency <= 1 do hit.Transparency = hit.Transparency + 0.2 wait(0.01) end
wait(0.01) hit.Parent = nil end
wait(0.05) halt = false mouse.Icon = "rbxasset://textures\\GunCursor.png" end
function onSelected(mouse) mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end
bin.Selected:connect(onSelected)
Can anyone explain why?
|
|
|
| Report Abuse |
|
|
| 20 Feb 2016 07:08 PM |
make sure it's a localscript
real men don't know they have feet |
|
|
| Report Abuse |
|