I have a issue with PlayerOwnsAsset. They "if game:GetService" line says Arugment Missing or Nil.
plr = game.Players:FindFirstChild(script.Parent.Parent.Parent.Selecteduser.User.Text) passId = 1761589018 script.Parent.MouseButton1Click:Connect(function() if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr, passId) then script.Parent.Parent.Parent.Parent.BusinessAgree:TweenPosition(UDim2.new(.042,0,.352,0)) script.Parent.Parent.Parent.Parent.BusinessAgree["Check-in"].TextLabel.Text = "The following player has Business, please press continue." else script.Parent.Parent.Parent.Parent.BusinessAgree:TweenPosition(UDim2.new(.042,0,.352,0)) script.Parent.Parent.Parent.Parent.BusinessAgree["Check-in"].TextLabel.Text = "The following player does not have Business, this will automatically close now" end end)
The reason why it's erroring with Argument Missing or Nil is because you're defining the player wrong, and is not a safe way to define the player at all. Assuming this is a LocalScript, you would instead need to use game.Players.LocalPlayer.
Also, another thing that's wrong with your script is the HUGE amounts of script.Parent's, it's very unnecessary in my opinion and reduces readability by a lot, which is something programmers should generally keep in mind when making scripts. Assuming the code you're showing right now is the only code in your script, you can just move the LocalScript closer to the MainFrame or whatever is close to BusinessAgree to avoid the script.Parent.Parent, etc, or you can just use variables.
Lastly, use never forget to make your variables local.
So you could do this instead
local plr = game.Players.LocalPlayer local passID = 1761589018 local button = button location --was script.Parent local BusinessAgree = location button.MouseButton1Click:Connect(function() if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr, passId) then --code else --code end end)