Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

This script only works in studio?

Asked by 9 years ago

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

Log in to vote
0
Answered by 9 years ago

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

Ad

Answer this question