Im trying to make a game and have some kind of idea of scripting but i don't see the problem, i have also made a script for like teleport pads but it ain't working. the output says nothing??? also the script in some parts is going red for example game, Enum

here is the sprint script:

local UserInput = game:GetService('UserImputService') local Players = game:GetService('Players')

local sprint speed = 32 local walk speed = 16

local players = Players.LocalPlayer

local function beginsprint(imput, gameProcessed) if not gameProcessed then if imput.UserImputType == Enum.UserInputType.Keyboard then local keycode = input.KeyCode if keycode = Enum .Keycode.Leftshift then player.Character.Humanoid.WalkSpeed = sprintSpeed end end end end

local function beginsprint(imput, gameProcessed) if not gameProcessed then if imput.UserImputType == Enum.UserInputType.Keyboard then local keycode = input.KeyCode if keycode = Enum .Keycode.Leftshift then player.Character.Humanoid.WalkSpeed = WalkSpeed end end end end

UserInput.ImputBegan:Connect(beginprint) UserInput.Imput Began:Connect (endsprint)

(dont critise i got it from a vid)

3 comments

0

UserImputType does not exist. You put m instead of n.

0

ty ill try

0

also why is the Enum in my script red???