function Touch(hit) local Tor = hit.Parent:FindFirstChild("Torso") local Spawn = game.Workspace.Stages:FindFirstChild("1") local hum = hit.Parent:FindFirstChild("Humanoid") if Tor then if hum then hum.WalkSpeed = 16 Tor.Position = Spawn.Position end end end script.Parent.Touched:Connect(Touch)
I guess you should change the CFrame of the Humanoid Root Part to the spawn's CFrame like this:
function Touch(hit) local Spawn = game.Workspace.Stages:FindFirstChild("1") local parent = hit.Parent --Getting the parent of the part that touched the brick if game.Players:GetPlayerFromCharacter(parent) then --Checking if the parent is a player's character parent.HumanoidRootPart.CFrame = Spawn.CFrame + Vector3.new(0,5,0) --Changin the humanoid root part CFrame to the spawn CFrame plus 5 studs up so the player doesnt get stuck on the floor end end script.Parent.Touched:Connect(Touch)
script.Parent.Touched:Connect(function(h) local hum = h.Parent:FindFirstChild('Humanoid') if hum ~= nil then h.Parent.HumanoidRootPart.CFrame = CFrame.new(workspace.Stages.StageOne.Position) end end)