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

Why it doesnt work???

Asked by 10 years ago

Well this is the checkpoint system for spawners. When I play it I keep falling and I checked everything and I don't know what's wrong!

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,3,0)
wait()
object.Torso.CFrame = sl.CFrame + Vector3.new(0,3,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)
0
Are you basing the second torso cframe (line 9) on a value (line 5)? GoldenPhysics 474 — 10y

Answer this question