Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

W001 unkown global 'player how do I fix this?

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

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.