Hi I have a Gui button that I want the player to teleport to a part when click. But it doesn't work. I have tried putting the teleport script in the Gui button. It didn't work so I tried to send a remote event to severscriptservice to teleport the player still don't work. The remote event is named TP and the scripts are just scripts. Gui button script:
script.Parent.MouseButton1Click:Connect(function(player)
game.ReplicatedStorage.TP:FireClient()
end)
ServerScriptService Script:
game.ReplicatedStorage.TP.OnServerEvent:Connect(function(player)
player.Character.HumanoidRootPart.Position = workspace.CarSpawnPlayer.Position
end)

5 comments
Hi I did all the fixes you suggested I keep receiving an error error code: FireServer can only be called from the client.
Oh crap hi Kirda
????
the script in the button must be localscript!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thank you this helps me a lot!!