Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

W001 unkown global 'player how do I fix this?

Asked by
XoidlI 5
3 years ago

Heres the script please help I dont know how to fix this

local char = player.Character
local PlayerHRP = char.HumanoidRootPart
local Stand = char:FindFirstChild(speaker.Name.." Stand")
local StandHRP = Stand.HumanoidRootPart
local AnimControl = Stand.AnimationController
local RightPunch = AnimControl:LoadAnimation(script.Parent.Parent.Parent.Animations.Right)
local LeftPunch = AnimControl:LoadAnimation(script.Parent.Parent.Parent.Animations.Left)

1 answer

Log in to vote
0
Answered by
TGazza 1336 Moderation Voter
3 years ago

Assuming this is a local script then your player variable should be something like:

local player = game.players.LocalPlayer
local char = player.Character
local PlayerHRP = char.HumanoidRootPart
local Stand = char:FindFirstChild(speaker.Name.." Stand")
local StandHRP = Stand.HumanoidRootPart
local AnimControl = Stand.AnimationController
local RightPunch = AnimControl:LoadAnimation(script.Parent.Parent.Parent.Animations.Right)
local LeftPunch = AnimControl:LoadAnimation(script.Parent.Parent.Parent.Animations.Left)

if your script isn't a local script then make a local script and try your script but add the player variable above all else as it looks above.

Ad

Answer this question