Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

This script only works in studio?

Hey, ds here. I'm wondering why this double jump script (a LocalScript inside ServerScriptService) won't work in the real game. It only works in a normal script in Studio, and neither in the client.


local uis = game:GetService('UserInputService')


uis.InputBegan:connect(function(input,process)
   
    if not process then
 
char=game.Players.LocalPlayer
        if input.KeyCode == Enum.KeyCode.Space and game.Players.LocalPlayer.Character.Torso.Velocity.Y>0 and char.Jump.Value==0 then
	char.Jump.Value=1
	char=game.Players.LocalPlayer.Character
	char.Humanoid.Jump=true
	char.Torso.Velocity=Vector3.new(0,100,0)
	wait(.5)
	

	char=game.Players.LocalPlayer
wait(2)
	char.Jump.Value=0
	
            print('Double JUmped pressed')
        end
    end
end)


Help is appreciated!

1 answer

✓ Accepted answer

Your only problem here is localscript can't even run in a ServerScriptService because its server and not local !

This discussion is preserved as it was. New answers, comments, and votes are closed.