So, I'm trying to make it so a player can tp somewhere by clicking a button. But, I just can't figure out how to get the script to find out who the player is. I tried using "LocalPlayer" but that gets the player in "Players" service not in workspace. What do I do?
local Player = workspace.LocalPlayer
game.ReplicatedStorage.BackToLobby.OnServerEvent:Connect(function()
Player.Character.HumanoidRootPart.CFrame = CFrame.new(-44.093, 3.225, 35.84)
end)

2 comments
Also, you cannot reference local player in a server script, it will just error since the server ain't a player it's a server.
Yeah I know, I was just trying it to see if it would work lol. Anyways thanks for the answer, I actually already figured it out which was just going back to the local script and using "player.Character" but the info you gave me is also pretty useful so I might use this instead since it isn't a local script.