How do i nil a character using a server script?

how do i nil a character using a server script?

1 Like

Can you be a bit more specific on what you’re trying to do?

1 Like

when i’m using a server script it says attempt to nil with character

1 Like

is there any code you can show us?

1 Like

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local HumRootPart = Character:WaitForChild(“HumanoidRootPart”)

script.Parent.Humanoid:MoveTo(HumRootPart.Position)

if you use LocalPlayer in a serverscript it will return nil.