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
Assuming this is a ServerScript and not a LocalScript, here you go:
local id = 987509977 game.Players.PlayerAdded:connect(function(player) if game:GetService("GamePassService"):PlayerHasPass(player, id) then local frame = player.PlayerGui:WaitForChild('pAID').Frame --Assuming script.Parent.Parent was just game.Players.LocalPlayer.PlayerGui frame:TweenPosition(UDim2.new(0, 0, 5, 0), "In", 'Back', 10) end end)