Error: 12:55:56.743 Players.CMB1048.PlayerScripts.LocalScript:22: Expected 'end' (to close 'then' at line 13), got <eof>; did you forget to close 'then' at line 18? - Studio - LocalScript:22
UserInputService = game:GetService("UserInputService") local players = game.Players.LocalPlayer local UserInputService = game:GetService("UserInputService") local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() UserInputService.InputBegan:Connect(function(input,gameProcessed) --if not gameProcessed then if input.KeyCode == Enum.KeyCode.LeftShift then if players:FindFirstChild("Humanoid") then players.Humanoid.CharacterWalkSpeed = 90 UserInputService.InputEnded:Connect(function(input,gameProcessed) if input.KeyCode == Enum.KeyCode.LeftShift then if players:FindFirstChild("Humanoid") then players.Humanoid.CharacterWalkSpeed = 16 end end end)
You didn't close your if statements and your function. I just added "ends"
UserInputService = game:GetService("UserInputService") local players = game.Players.LocalPlayer local UserInputService = game:GetService("UserInputService") local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() UserInputService.InputBegan:Connect(function(input,gameProcessed) --if not gameProcessed then if input.KeyCode == Enum.KeyCode.LeftShift then if players:FindFirstChild("Humanoid") then players.Humanoid.CharacterWalkSpeed = 90 UserInputService.InputEnded:Connect(function(input,gameProcessed) if input.KeyCode == Enum.KeyCode.LeftShift then if players:FindFirstChild("Humanoid") then players.Humanoid.CharacterWalkSpeed = 16 end end end) end end end)