I am trying to make a script that only people whit a certain rank or above in a roblox group, can see a gui but it dosen't work
I've tried a lot of different things, nothing worked, here is my current script...
local Player = game.Players.LocalPlayer local GUI = game.StarterGui.ScreenGui.Frame local Button = game.StarterGui.ScreenGui.Frame.TextLabel local Minimun = 250 -- Rank Premisions Currently local groupId = 5445897 -- Group ID if Player:GetRankInGroup(groupId) >= Minimun then GUI.Visible = true Button.Visible = true else print("U get no GUI") end
Can someone help?
local Player = game.Players.LocalPlayer local GUI = Player.PlayerGui.ScreenGui.Frame local Button = Player.PlayerGui.ScreenGui.Frame.TextLabel local Minimun = 250 -- Rank Premisions Currently local groupId = 5445897 -- Group ID if Player:GetRankInGroup(groupId) >= Minimun then GUI.Visible = true Button.Visible = true else print("U get no GUI") end
Anything in the StarterGui automatically gets copied into the PlayerGui inside of a player when the game starts. So, you need to make edits to the player's PlayerGui.