local ID = 1038094
local GUI = game.ServerStorage.GUI1
game.Players.PlayerAdded:connect(function(Plr)
Plr.ChildAdded:connect(function()
if Plr:IsInGroup(ID) and Plr:GetRankInGroup(ID) >= 4 then
GUI:Clone().Parent = Plr.PlayerGui
end
end)
end)
COMMUNITY QUESTION
Why this not Working in Online Server?
1 answer
I see no point in using Plr.ChildAdded:connect(function() .
You should be using ReplicatedStorage instead of ServerStorage
So don't forget to move the GUI!
Your code should look like this:
local ID = 1038094
local GUI = game.ReplicatedStorage.GUI1
game.Players.PlayerAdded:connect(function(Plr)
if Plr:IsInGroup(ID) and Plr:GetRankInGroup(ID) >= 4 then
GUI:Clone().Parent = Plr.PlayerGui
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
