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

Not valid member of model problem?

Basically, when a tool is selected, I want it to go inside a model and find the part that I need it to find in order to make the ScreenGui available to see when touched. However, I keep getting this error: " gui is not a valid member of Model" when it definitely is. I can't seem to work out why it's not working. I can post the whole script if you like, but I'm just trying to see why the problem is occurring first. Thanks!

script.Parent.Equipped:connect(function()
x = Instance.new("IntValue")
x.Parent = script.Parent.Parent
wait(.1)
x.Parent.gui.Script.Disabled = false
wait(1)
x.Parent.gui.Script.Disabled = true
end)

I pasted an IntValue as the tool ends up with a new parent after a while (it goes to the StarterPack), and it's basically there so I could access the parts which are inside the IntValue's parent.

1 answer

✓ Accepted answer

When a tool is Equipped its parent changes to the player's character.

1 comment

0

Done!

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