local Player = game.Players.LocalPlayer local player = game.Players:GetPlayerFromCharacter(char) local char = Player.Character local Character = Player.Character local RootPart = Character.HumanoidRootPart
COMMUNITY QUESTION
how to fix attempt to index local "Player" (a nil value) line 3?
1 answer
local Player = game.Players.LocalPlayer
local player = game.Players:GetPlayerFromCharacter(char)
local char = Player.Character
local Character = Player.Character
local RootPart = Character.HumanoidRootPart
If you're trying to address game.Players.LocalPlayer, then you need to be using a LocalScript
This discussion is preserved as it was. New answers, comments, and votes are closed.
