So as I said, it will not work unless you disable and re-enable it every time, no idea why, there are no outputs at all.
This is in a LocalScript in a hopper bin.
Here's the code:
local tool = script.Parent
local player = game.Players.LocalPlayer
local character = player.Character
local cooldown = 5
mouse = player:GetMouse()
debounce = false
mouse.KeyDown:connect(function(key)
if debounce == true then return end
debounce = true
if key:byte() == 32 then --spacebar is 32
sj = Instance.new("BodyThrust", character.Torso)
sj.force = Vector3.new(0,3000,0)
wait(0.5)
sj:Destroy()
wait(cooldown)
debounce = false
end
end)
If you can explain how you got it to work I'd appreciate it.
And if you are up for it, maybe tell me how to convert it so it's not in a tool, but like a double press spacebar to active or something like that.
Any help would be appreciated.
