LocalScript: (teleports the player)
local debounce = false
game.ReplicatedStorage.Teleport2.OnClientEvent:Connect(function()
if debounce then return end --Stops if debounce is already true
debounce = true
wait(0.1)
game.Workspace:WaitForChild(game.Players.LocalPlayer.Name).UpperTorso.CFrame = CFrame.new(-393.213, 8.21, -215.382)
end)
ServerScript: (Fires remoteevent when player touches)
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid")then
game.ReplicatedStorage.Teleport:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
end
end)

1 comment
It works perfectly fine, just it doesn't work again.