Hello, I made an invite system for my hotel game that would if I write the player name in the text box
and press the button it will make pop up to the player I wrote , I’m using a remote event and :FireClient ,
Here is the GUI local script:
local playerName = script.Parent.Text
local MakeInviteVisible = game.ReplicatedStorage.MakeInviteVisible
script.Parent.Parent.TextButton.MouseButton1Click:Connect(function()
if game.Players:FindFirstChild(playerName) then
MakeInviteVisible:FireClient(game.Players:FindFirstChild(playerName))
end
end)
local MakeInviteVisible = game.ReplicatedStorage.MakeInviteVisible
script.Parent.Parent.TextButton.MouseButton1Click:Connect(function()
local playerName = script.Parent.RemoteFunction:InvokeClient(script.Parent.Parent.Parent.Parent)--The player
if game.Players:FindFirstChild(playerName) then
MakeInviteVisible:FireClient(game.Players:FindFirstChild(playerName))
end
end)
That’s how my Explorer looks:
Then in the local script:
script.Parent.RemoteFunction.OnClientInvoke = function()
return script.Parent.Text
end
Look just use easier way like I told you first. Change FireClient to FireServer, then make the server listen to that and send the invite to the client.