nasirs001
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 395 |
|
|
| 27 Jan 2015 08:50 PM |
this script used to work but all of a sudden just didn't for me. I cant think of anything wrong with it because it works in studio but not in actual servers, any help is appreciated.
-clockwork
local bin = script.Parent local Player = Game.Players.LocalPlayer local mouse = Player:GetMouse() local c = Player.Character
enabled = true
function onButton1Down(mouse) if not enabled then return end local player = game.Players.LocalPlayer if player == true then return end print("trigger") -- find the best cf
enabled = false local B1=game.Lighting.Boulder:Clone() B1.Parent = workspace B1.Anchored = false B1.CanCollide = false G= Instance.new("BodyVelocity", B1) G.maxForce = Vector3.new(math.huge, math.huge, math.huge) G.velocity = (mouse.Hit.p-c.Torso.Position).unit*80 B1.CFrame = c.Torso.CFrame*CFrame.new(0, 0,-6) game:GetService("Debris"):AddItem(B1, 1.5) function Damage(hit) human = hit.Parent:FindFirstChild("Humanoid") -- returns "Humanoid" if exists, else returns nil if human ~= nil then local player = game.Players.LocalPlayer if player == true then return end print("trigger") -- if the toucher is human, then human:TakeDamage(10) -- damage the human end end
function explode() e = Instance.new("Explosion", B1) e.BlastPressure = 0 e.BlastRadius = 1 e.Position = B1.Position end B1.Touched:connect(Damage) B1.Touched:connect(explode) game:GetService("Chat"):Chat(c.Head, "EARTH RELEASE:BOULDER SHOT!!!") wait(1.5)
enabled = true end
function onSelected(mouse) print("select") mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end
bin.Selected:connect(onSelected)
|
|
|
| Report Abuse |
|