Hi there, I have made a bell system for my game. When I test this system in my development baseplate, it works just fine. However, when I add it to my actual game, unfortunately, I receive the error: BellSystem is not a valid member of Workspace “Workspace”.
Any ideas on how I would resolve this? All help is very appreciated!
Here is the error:
Here is the code:
local p = game.Players.LocalPlayer
local selected = ""
local req = 18 --252
game.Workspace.BellSystem.SurfaceGui.Frame.Verify.VERIFY.MouseButton1Click:connect(function()
if p:GetRankInGroup(3965514) >= req then
game.Workspace.BellSystem.SurfaceGui.Frame.Verify.Visible = false
game.Workspace.BellSystem.SurfaceGui.Frame.Start.Visible = true
end
end)
local p = game.Players.LocalPlayer
local selected = ""
local req = 18 --252
game.Workspace:WaitForChild("BellSystem").SurfaceGui.Frame.Verify.VERIFY.MouseButton1Click:connect(function()
if p:GetRankInGroup(3965514) >= req then
game.Workspace.BellSystem.SurfaceGui.Frame.Verify.Visible = false
game.Workspace.BellSystem.SurfaceGui.Frame.Start.Visible = true
end
end)
Is the model anchored? I’ve had that same problem loads of times and mostly it’s because of it ceasing to exist due to it being unanchored. Otherwise ‘waitforchild’ should work as suggested.
In addition to the reply above:
If a model is unanchored and has cancollide set to false, it will just fall through the floor and eventually get eaten by the void.
I’ve tested it and marked as solved. I would of got back to this yesterday but I was pretty busy. Thank you! I realized this is the way to do it but I misspelled the wait for child that’s why it wasn’t working haha.