Hey, I am kinda a noob at making Lua Scripts on ROBLOX. I have tried to make a local script find if a player has a game pass and if it does the GUI tweens out. Unfortunately, the game keeps coming up with errors for the script. I might be doing something wrong... Here it is
local id = 987509977
local frame = script.parent.Parent:WaitForChild('pAID').Frame
game.Players.PlayerAdded:connect(function(player)
if HasPass = Game:GetService("GamePassService"):PlayerHasPass(player, id) then
frame:TweenPosition(UDim2.new(0, 0,5, 0,'in', 'Back', 10)
)
end
end)
Responding to a solution would be grateful :D

3 comments
Hey, This doesn't seem to work online. It does though on studio, why's that?
Are you using a LocalScript or ServerScript?
I've tried both. But I'd prefer a local script