|
| 08 Aug 2012 11:46 AM |
script.Parent.MouseButton1Click:connect(function() if ison then ison=false p:Destroy() script.Parent.Text="Anti-Grief: OFF" else ison=true c=script.Parent.Parent.Parent.Parent.Character p=Instance.new("Part",c) w=Instance.new("Weld",p) script.Parent.Text="Anti-Grief: ON" p.Size=Vector3.new(8,8,8) p.CFrame = c.Torso.CFrame w.Part0 = p w.Part1 = c.Torso p.Shape=0 p.BrickColor=BrickColor.new("Bright blue") p.Transparency = 0.6 p.TopSurface = "Smooth" p.BottomSurface = "Smooth" p.Anchored=false p.CanCollide=false end end)
**It is supposed to create a forcefield that welds to a player's torso, but the weld for some reason doesn't work** |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2012 11:47 AM |
I'm guessing this isn't the whole script?
† KMXD † |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Aug 2012 11:50 AM |
You defined p after using it:
p:Destroy() --using p script.Parent.Text="Anti-Grief: OFF" else ison=true c=script.Parent.Parent.Parent.Parent.Character p=Instance.new("Part",c) --defining it |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2012 11:51 AM |
| That's not the problem, I did that once before and it worked. |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2012 11:53 AM |
| YOU NOOBS UR NOT HELPING ME I REPORTED ALL OF YOU!@!!!!!!!!!!!!!!!!! |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2012 11:55 AM |
If this is the whole script, ison is never defined, so it would never fire.
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2012 11:56 AM |
| ison is just a value in the script, not an object |
|
|
| Report Abuse |
|
|