|
| 02 Apr 2014 12:13 PM |
It works in offline mode but not in online i got a online out put window and the error is this:attempt to call 'char' a userdata value and the script wont work its in a hopper bin. heres the script: Bin = script.Parent Backpack = Bin.Parent Me = Backpack.Parent char = Me.Character PlayerGui = Me.PlayerGui Humanoid = char.Humanoid Torso = char.Torso Head = char.Head LeftArm = char("Left Arm") RightArm = char("Right Arm") LeftLeg = char("Left Leg") RightLeg = char("Right Leg") Neck = Torso("Neck") RightShoulder = Torso("Right Shoulder") LeftShoulder = Torso("Left Shoulder") RightHip = Torso("Right Hip") LeftHip = Torso("Left Hip")
NeckC0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) NeckC1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) LeftShoulderC0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) LeftShoulderC1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) RightShoulderC0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) RightShoulderC1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) LeftHipC0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) LeftHipC1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) RightHipC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) RightHipC1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
function RefreshWelds() Neck.C0 = NeckC0 Neck.C1 = NeckC1 RightShoulder.C0 = RightShoulderC0 RightShoulder.C1 = RightShoulderC1 LeftShoulder.C0 = LeftShoulderC0 LeftShoulder.C1 = LeftShoulderC1 RightHip.C0 = RightHipC0 RightHip.C1 = RightHipC1 LeftHip.C0 = LeftHipC0 LeftHip.C1 = LeftHipC1 end
Activated = false
function Attack(mouse) if not Activated then
Activated = true
mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
Gyro = Instance.new("BodyGyro") Gyro.Parent = Torso Gyro.D = 50 Gyro.maxTorque = Vector3.new(0, 0, 0) Gyro.cframe = Torso.CFrame Velocity = Instance.new("BodyVelocity") Velocity.Parent = Torso Velocity.maxForce = Vector3.new(0, 0, 0) Position = Instance.new("BodyPosition") Position.Parent = Torso Position.maxForce = Vector3.new(0, 0, 0)
Velocity.maxForce = Vector3.new(math.huge, math.huge, math.huge) Velocity.velocity = Torso.CFrame.lookVector * 120 Humanoid.PlatformStand = true
Position.maxForce = Vector3.new(0, math.huge, 0) Position.position = Torso.Position+Vector3.new(0, 23, 0)
Position.maxForce = Vector3.new(0, 0, 0) handle2 = Instance.new("Part") handle2.Parent = char handle2.TopSurface = "Smooth" handle2.BottomSurface = "Smooth" handle2.Size = Vector3.new(5, 6, 5) handle2.Name = Me.Name handle2.CFrame = Torso.CFrame if char:findFirstChild("PVB") ~= nil then handle2.BrickColor = BrickColor.new("Alder") end Owner = Instance.new("ObjectValue") Owner.Parent = handle2 Owner.Name = "Owner" Owner.Value = Me weld = Instance.new("Weld") weld.Part0 = Torso weld.Part1 = handle2 weld.Parent = Torso weld.C0 = CFrame.new(0, 0, 0)*CFrame.fromEulerAnglesXYZ(0, 0, 0) handle21 = Instance.new("Part") handle21.Transparency = 0.7 handle21.Parent = char handle21.BrickColor = BrickColor.new("Bright red") if char:findFirstChild("PVB") ~= nil then handle21.BrickColor = BrickColor.new("Royal purple") end handle21.TopSurface = "Smooth" handle21.BottomSurface = "Smooth" handle21.Size = Vector3.new(5, 1, 5) handle21.CFrame = Torso.CFrame weld2 = Instance.new("Weld") weld2.Part0 = Torso weld2.Part1 = handle21 weld2.Parent = Torso weld2.C0 = CFrame.new(0, 0, 0)*CFrame.fromEulerAnglesXYZ(0, 0, 0) p2 = Instance.new("SpecialMesh") p2.Parent = handle21 p2.Scale = Vector3.new(2, 26, 2) p2.MeshType = "Sphere" p = Instance.new("SpecialMesh") p.Parent = handle2 p.Scale = Vector3.new(15, 20, 15) p.MeshType = "FileMesh" p.MeshId = "http://www.roblox.com/asset/?id=1051557" Gyro.maxTorque = Vector3.new(math.huge, math.huge, math.huge) Gyro.cframe = Torso.CFrame * CFrame.Angles(1.57, 0, 0) Bleh = "" for i = 1 , 50 do Gyro.cframe = Gyro.cframe * CFrame.fromEulerAnglesXYZ(0, 0.8, 0)
for u, c in pairs(workspace:GetChildren()) do if c.Name ~= Me.Name then h = c:findFirstChild("Humanoid") t = c:findFirstChild("Torso") if h ~= nil and t ~= nil then if (Torso.Position-t.Position).magnitude <= 17 then h.Sit = true t.Velocity = t.CFrame.lookVector * 150 + Vector3.new(0, 75, 0) if Bleh ~= t then h:TakeDamage(script.Parent.Parent.Parent.supercool.Lvl.Value*4) Bleh = t end t.CFrame = t.CFrame * CFrame.Angles(math.random(-3, 3), math.random(-3, 3), math.random(-3, 3)) end end end end wait() end Humanoid.PlatformStand = false Position:Remove() Velocity:Remove() Gyro:Remove() handle2:Remove() handle21:Remove() RefreshWelds() wait(2) mouse.Icon = "rbxasset://textures\\GunCursor.png" Activated = false end end
function onSelected(mouse) mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() Attack(mouse) end) end
script.Parent.Selected:connect(onSelected) |
|
|
| Report Abuse |
|