Hello, my name is dog6779. This is my first time scripting.
Problem
I trying to make a Gui where it pops up but ONLY GROUP MEMBERS can only see it. But I want it where it does its animation. By the way, it is in a folder which I would be organized most of the time. As you can see the main:TweenPosition(UDim2.new(0.284, 0,0.201, 0), "Out","Bounce",0.5) that a animation to make where it get clicked then it pops up.
Script
game.Workspace.Computers.Computer1.Screen.ClickDetector.MouseClick:Connect(function(playerInGroup)
game.Players.PlayerAdded:Connect(function(Player)
if Player:GetRankinGroup(4222666) == 0 then
if open == false then
Player.PlayerGui.Main.Frame.Visible = false
main:TweenPosition(UDim2.new(0.284, 0,0.201, 0), "Out","Bounce",0.5)
if close == true then
Player.PlayerGui.Main.Frame.Visible = true
main:TweenPosition(UDim2.new(0.284, 0, 1, 0), "Out","Bounce",0.5)
end
end)
end
end)
print("Frame Open!")
Please tell me what I do wrong?

3 comments
You’re modifying the PlayerGui on the server. That’s what’s wrong.
But how do I fix it?
Edited.