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)

5 comments
This is because you’re cloning GUI’s and editing the
PlayerGuifrom the server.Also can you post the hierarchy? Everyone says 'it is a valid member' but it’s probably not.
Not probably not. It isn't parented to the Instance yet.
^?
did you try script.Parent:WaitForChild