Hello dev forums, I have been working on a tool but came upon an error.
note: this is a normal script inside of a tool
This is what the output said:
“Players.abrah_m.Backpack.Arrow.Script:5: attempt to index nil with ‘Stand’”
Here is the part of the code where the error occurred:
local player = game.Players:GetPlayerFromCharacter(script.Parent.Parent)
script.Parent.Activated:Connect(function()
’ local char = script.Parent.Parent
’ local stand = player:WaitForChild(“Stand”) ← This is where the output came from
…
end)
I also have this script in ServerScriptService:
game.Players.PlayerAdded:Connect(function(player)
local stand = Instance.new(“StringValue”,player)
stand.Name = “Stand”
stand.Value = “none”
end)
I’m pretty confused on this one as I’m pretty new to tools. Thanks!