How to put body velocity to a scripted player

Hello roblox community.

I need help with the body velocity, I try to put a Body velocity to the player with scripts, but when putting

“Game.Players.Localplayer.Character.HumanoidRootPart”.
I get an error in “character”, can anyone help me?

That is pretty obvious, because your casing syntax is really wrong.

game.players should be written as game.Players, localplayer as LocalPlayer, character as Character and humanoidrootpart as HumanoidRootPart.

You should probably also wait for Character, as it might not have loaded in some cases.

1 Like

I know that in the publication it writes it without capital letters, but I wrote it with capital letters in the script. No matter how much I wait more than 30 minutes, I get an error.

can you say the full error
is it a local script or a server script

this should work

local player = game.Players.LocalPlayer -- the local player
local character = player.Character or player.CharacterAdded:Wait() -- the player's character

-- rest of your code here
1 Like