https://gyazo.com/3c0d7b6e19d11dc394561fe5aae3d8ca
Everytime I start the game, it give the error "Onee is not a valid member of ScreenGui"
Even though it is in there. Here are the scripts.
game.Players.PlayerAdded:connect(function(plr) s = game.ServerStorage.ScreenGui:Clone() s.Parent = plr.PlayerGui while true do wait(0.01) plr.PlayerGui.ScreenGui.TextLabel.Text = game.ReplicatedStorage.One.Value end end)
2nd:
game.ReplicatedStorage.RemoteEvent.OnServerEvent:connect(function() game.ReplicatedStorage.One.Value = game.ReplicatedStorage.One.Value + 1 print(game.ReplicatedStorage.One.Value) if game.ReplicatedStorage.One.Value == 2 then game.Workspace.Part.BrickColor = BrickColor.new("Black") end end)
3rd: Local Script
a = 0 script.Parent.Onee.MouseButton1Click:connect(function() if a < 1 then a = 1 game.ReplicatedStorage.One.Value = game.ReplicatedStorage.One.Value + 1 print(game.ReplicatedStorage.One.Value) game.ReplicatedStorage.RemoteEvent:FireServer() end end)
awwww i get this annoying error all the time and it is because UIs don't load in as fast as other items. So what you'll need to do is add a 'WaitForChild()'
E.G:
script.Parent:WaitForChild("Onee")