Player = script.Parent.Parent.Parent.Parent.Main.Selecteduser.User.Text EconomyAgree = script.Parent.Parent.Parent.Parent.EconomyAgree script.Parent.MouseButton1Click:Connect(function() game.Players[Player].PlayerGui.ManualCheckInConfirm.Economy:TweenPosition(UDim2.new(.33,0,.714,0)) EconomyAgree:TweenPosition(UDim2.new(.042,0,.652,0)) EconomyAgree.Visible = false end)
I have a script but it says that the line "game.Players[Player]" is not a valid member of Players but Player has a name in it.
With the game.Players[Player] Line I think you'd want to use a Tostring of the player using the text so while inside a FindFirstChild. So the script will be searching the Players Section to find the player and you are converting the tostring to text.
Player = script.Parent.Parent.Parent.Parent.Main.Selecteduser.User.Text EconomyAgree = script.Parent.Parent.Parent.Parent.EconomyAgree script.Parent.MouseButton1Click:Connect(function() game.Players:FindFirstChild(tostring(Player)).PlayerGui.ManualCheckInConfirm.Economy:TweenPosition(UDim2.new(.33,0,.714,0)) EconomyAgree:TweenPosition(UDim2.new(.042,0,.652,0)) EconomyAgree.Visible = false end)
Hope this helps. I haven't tested it for myself but if it does, accept this answer please.
Player = script.Parent.Parent.Parent.Parent.Main.Selecteduser.User EconomyAgree = script.Parent.Parent.Parent.Parent.EconomyAgree script.Parent.MouseButton1Click:Connect(function() game.Players[Player.Text].PlayerGui.ManualCheckInConfirm.Economy:TweenPosition(UDim2.new(.33,0,.714,0)) EconomyAgree:TweenPosition(UDim2.new(.042,0,.652,0)) EconomyAgree.Visible = false end)
This worked, make sure you put it in a Local Script!