function a(key) if key = "e" then x = Instance.new("Part") x.CFrame = script.Parent.Parent.Character.Torso.CFrameCFrame.new(0,0,5) y = Instance.new("BodyVelocity", x) y.maxForce = Vector3.new(math.huge,math.huge,math.huge) y.velocity = script.Parent.Parent.Character.CFrame.lookVector80 x.Touched:connect(function(target) if target.Parent:FindFirstChild("Humanoid") then target.Parent.Humanoid.Health = target.Parent.Humanoid.Health - 20 if target.Parent.Humanoid.Health == 0 then script.Parent.leaderstats.xp = script.Parent.leaderstats.xp + 5 script.Parent.leaderstats.gold = script.Parent.leaderstats.gold +5 end end end) game.Debris:AddItem(x,5) end end
mouse.KeyDown:connect(a)
Im not very sure why it doesnt work, i need someone to tell me
It is quite hard to view a script without putting
code here
Please do that and then we will help you!
Best regards, Nathan.
function a(Key)
if key = "e" then
x = Instance.new("Part")
x.CFrame = script.Parent.Parent.Character.Torso.CFrame*CFrame.new(0,0,5)
y = Instance.new("BodyVelocity", x)
y.maxForce = Vector3.new(math.huge,math.huge,math.huge)
y.velocity = script.Parent.Parent.Character.CFrame.lookVector*80
end
game.Debris:AddItem(x,5)
end
end
mouse.KeyDown:connect(a) ~~~~~~~~~~~~~~~~~