Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Spawning Upside down when using a checkpoint in an obby ?

Asked by 6 years ago

I want to make an obby in Roblox, and the checkpoint script for the obby isn't really working. When you die and spawn back on the checkpoint, you will be upside down. You can't really do anything but after a couple of seconds, it automatically flips back over. There are two scripts:

function oa(object) local player = game.Players:playerFromCharacter(object) if player ~= nil then local ls = player.leaderstats local sl = game.Workspace:FindFirstChild(ls.Stage.Value) print("gah") object.Torso.CFrame = object.Torso.CFrame + Vector3.new(0,4,0) wait() object.Torso.CFrame = sl.CFrame + Vector3.new(0,4,0) end end

function oe(object) if object.className == "Player" then local ack = Instance.new("IntValue") ack.Name = "leaderstats" local ack2 = Instance.new("IntValue") ack2.Name = "Stage" ack2.Value = 1 ack2.Parent = ack ack.Parent = object end end

game.Players.ChildAdded:connect(oe) game.Workspace.ChildAdded:connect(oa) function ot(hit) if hit.Parent ~= nil then local player = game.Players:playerFromCharacter(hit.Parent) if player ~= nil then if player.leaderstats.Stage.Value == script.Parent.Name - 1 then local h = hit.Parent:FindFirstChild("Humanoid") if h ~= nil then if h.Health ~= 0 then player.leaderstats.Stage.Value = script.Parent.Name end end end end end end

script.Parent.Touched:connect(ot)

0
Please use the CodeBlocks button saSlol2436 716 — 6y
0
oh sorry I'm new to this website LordLotek 0 — 6y

Answer this question