I have a remote event in my game that when fired will set the teleportgui of a local user. This is because i have multiple exits in my games that will teleport you to different places, but the thing is, every time i use the remote event it gives the error shown in the title.
I fire the event using the code below (v is the player instance in game.Players btw)
game.ReplicatedStorage.SetTeleportGui:FireClient(v, escapeguione)
This is the code for the onclientevent
game.ReplicatedStorage.SetTeleportGui.OnClientEvent:Connect(function(escapegui)
game:GetService("TeleportService"):SetTeleportGui(escapegui)
end)
For the first code that fires the event, escapeguione is a screengui in replicatedstorage which i access using lua local escapeguione = replicatedstorage:WaitForChild("EscapeGuiOne")
If i just use :SetTeleportGui() normally without putting it in a remote event, it will work, but I will need more than one teleport gui