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

This variable never works in game and only in studio, any solutions?

This variable hole = tool.Hole doesn't work in game

local tool = script.Parent.Parent
local hole = tool.Hole

is there anyway to fix this?

1 answer

✓ Accepted answer

If you check the output it probably says something like "Hole is not a member of -Parent name here-". The error is because the script can't find Hole, because it hasn't been created yet. Utilize WaitForChild() on children.

local tool = script.Parent.Parent
local hole = tool:WaitForChild("Hole")

1 comment

0

ok

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