game.StarterPlayer.EnableMouseLockOption = false
local UserInpServ = game:GetService('UserInputService')
local ReplicatedStorage = game:GetService('ReplicatedStorage')
UserInpServ.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.LeftShift then
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 99
end
if Input.KeyCode == Enum.KeyCode.Q then
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 5
else if Input.KeyCode == Enum.KeyCode.Q then
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 15
end
end)
UserInpServ.InputEnded:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.LeftShift then
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 15
end
end)
✓ ANSWER ACCEPTED
help me with my code, someone? error expected identifier got '')"
1 answer
✓ Accepted answer
You added a space in between else and if, which looks like you have an extra if statement. Thus, the error you have is expecting an end. The correct keyword is elseif, not else if.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
i have an awnser but i have to wait 1.5 minutes to post another awnser to a question
thx ill wait
heyy