|
| 17 Feb 2014 11:38 AM |
This script works great.. I just can't seem to remove the part after the tool (HopperBin) is deselected, tried various ways, gave up, hoping one of you guys know how to do it lol.
Script so far:
bin = script.Parent me = script.Parent.Parent.Parent wepunz = me.Backpack.TerrierPunch
enabled = true
wepunz.Selected:connect(function(mouse)
if not enabled then return end
local player = game.Players.LocalPlayer if player == nil then return end enabled = false
mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
leftarm = me.Character:findFirstChild("Torso") if leftarm ~= nil then
bleh = 2
local p = Instance.new("Part") p.Parent = leftarm p.Size = Vector3.new(bleh, bleh, bleh) p.BrickColor = BrickColor.new("Bright red") p.Transparency = 0 p.TopSurface = "Smooth" p.BottomSurface = "Smooth" p.Shape = "Ball" a = Instance.new("Fire") a.Parent = p a.Heat = 0 a.Size = 5 w = Instance.new("Weld") w.Part0 = leftarm w.Part1 = p w.Parent = leftarm w.C1 = CFrame.new(0,1,0)*CFrame.Angles(0,0,0) hax = game.Lighting.TerrierPunch1:clone() hax.Parent = p wait(10)
mouse.Icon = "rbxasset://textures\\GunCursor.png" enabled = true end end)
|
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Feb 2014 12:06 PM |
| http://wiki.roblox.com/index.php?title=Deselected |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Feb 2014 12:22 PM |
Reason I failed - (excerpt)
bin = script.Parent me = script.Parent.Parent.Parent wepunz = me.Backpack.TerrierPunch players = game:GetService("Players") realme = players:FindFirstChild(me)
wepunz.Deselected:connect(function(mouse) game.Workspace.realme.Torso.Philberto:Remove() --[[realme is not a valid member of workspace]] end) |
|
|
| Report Abuse |
|
|
|
| 17 Feb 2014 12:23 PM |
| game.Workspace:findFirstChild(realme).Torso.Philberto:Remove() |
|
|
| Report Abuse |
|
|
|
| 17 Feb 2014 12:23 PM |
Philberto refuses to go away.
Yes the parts name IS Philberto, I changed the above originally posted script since it's been posted to name the part Philberto. |
|
|
| Report Abuse |
|
|
|
| 17 Feb 2014 12:24 PM |
:Destroy()*
my bad, :Remove() is deprecated |
|
|
| Report Abuse |
|
|
|
| 17 Feb 2014 12:31 PM |
Philberto is still sticking around q-q
Output
13:30:37.457 - Argument 1 missing or nil 13:30:37.458 - Script 'Players.Player3.Backpack.TerrierPunch.Script', Line 8 13:30:37.460 - stack end
bin = script.Parent me = script.Parent.Parent.Parent wepunz = me.Backpack.TerrierPunch players = game:GetService("Players") realme = players:findFirstChild(me)
wepunz.Deselected:connect(function(mouse) game.Workspace:findFirstChild(realme).Torso.Philberto:Destroy() end) |
|
|
| Report Abuse |
|
|
|
| 17 Feb 2014 12:37 PM |
bin = script.Parent me = script.Parent.Parent.Parent wepunz = me.Backpack.TerrierPunch
wepunz.Deselected:connect(function(mouse) me.Character.Torso.Philberto:Destroy() end)
-- I think this works |
|
|
| Report Abuse |
|
|
|
| 17 Feb 2014 01:13 PM |
It DOES work...
However... it only works once. :/ |
|
|
| Report Abuse |
|
|