1 | Player = script.Parent.Parent.Parent.Parent.Main.Selecteduser.User.Text |
2 | EconomyAgree = script.Parent.Parent.Parent.Parent.EconomyAgree |
3 |
4 | script.Parent.MouseButton 1 Click:Connect( function () |
5 | game.Players [ Player ] .PlayerGui.ManualCheckInConfirm.Economy:TweenPosition(UDim 2. new(. 33 , 0 ,. 714 , 0 )) |
6 | EconomyAgree:TweenPosition(UDim 2. new(. 042 , 0 ,. 652 , 0 )) |
7 | EconomyAgree.Visible = false |
8 | 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.
1 | Player = script.Parent.Parent.Parent.Parent.Main.Selecteduser.User.Text |
2 | EconomyAgree = script.Parent.Parent.Parent.Parent.EconomyAgree |
3 |
4 | script.Parent.MouseButton 1 Click:Connect( function () |
5 | game.Players:FindFirstChild( tostring (Player)).PlayerGui.ManualCheckInConfirm.Economy:TweenPosition(UDim 2. new(. 33 , 0 ,. 714 , 0 )) |
6 | EconomyAgree:TweenPosition(UDim 2. new(. 042 , 0 ,. 652 , 0 )) |
7 | EconomyAgree.Visible = false |
8 | end ) |
Hope this helps. I haven't tested it for myself but if it does, accept this answer please.
1 | Player = script.Parent.Parent.Parent.Parent.Main.Selecteduser.User |
2 | EconomyAgree = script.Parent.Parent.Parent.Parent.EconomyAgree |
3 |
4 | script.Parent.MouseButton 1 Click:Connect( function () |
5 | game.Players [ Player.Text ] .PlayerGui.ManualCheckInConfirm.Economy:TweenPosition(UDim 2. new(. 33 , 0 ,. 714 , 0 )) |
6 | EconomyAgree:TweenPosition(UDim 2. new(. 042 , 0 ,. 652 , 0 )) |
7 | EconomyAgree.Visible = false |
8 | end ) |
This worked, make sure you put it in a Local Script!