✓ Accepted answer
Okay so, for one, you don't need the second line. For two, a player doesn't have a StarterGui in them, they have a PlayerGui
For the differences between PlayerGui's and StarterGui's, click here
The script I'm going to give is for a Server Script. Everything new that will be added will be explained.
local id = 1324880817
local Players = game:GetService("Players")
Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
local RadioGui = plr.PlayerGui:WaitForChild("RadioGui")
if RadioGui then
local Button = RadioGui:WaitForChild("Button")
if Button then
if game:GetService('GamePassService'):PlayerHasPass(plr,id) then
Button.Visible = true
else
Button.Visible = false
end
end
end
end)
end)
Hope that this helped, make sure to mark this as resolved if it did!
2 comments
thank you
Your welcome.