Im making an invite system to invite them to a party and when they click on invite a gui pops up for the player.
When i click invite the gui doesnt pop up because i dont know how to replace player with text.
ex.
i have local InviteTo = script.Parent.Text
and want to replace game.Players.LocalPlayer to InviteTo
InvitePrompt.OnClientEvent:Connect(function(player, InviteTo)
game.Players.LocalPlayer.PlayerGui.Teams.Invited.Visible = true
game.Players.LocalPlayer.PlayerGui.Teams.Invited.TextLabel.Text = player.Name .. " has invited you to their party"
end)
InvitePrompt.OnClientEvent:Connect(function(player, InviteTo)
InviteTo.PlayerGui.Teams.Invited.Visible = true
InviteTo.PlayerGui.Teams.Invited.TextLabel.Text = player.Name .. " has invited you to their party"
end)
but it doesnt work and i have no errors