gui = script.Parent.Parent.Rarity function enter() gui.Visible=true end function leave() gui.Visible=false end script.Parent.MouseEnter:connect(enter) script.Parent.MouseLeave:connect(leave)
This works in studio single player testing, but going onto a server gives an error on line 1 saying that Rarity is not part of the Frame it's in. Any help with this?
gui = script.Parent.Parent:WaitForChild("Rarity") --this has happened to me too, but adding "WaitForChild" will make the script wait until the object is loaded or found. script.Parent.MouseEnter:connect(function() -- more efficient than the other method you were using. gui.Visible = true end) script.Parent.MouseLeave:connect(function() gui.Visible = false end)