So the problem is that the player sometimes spawns in a 90 degree angle then takes 2 seconds to stand up. Heres my code, tell me if anything is wrong.
player.CharacterAdded:Connect(function(character) wait() for i,v in pairs(findBase) do local owner = v:FindFirstChild("Owner") if v.Owner.Value == character.Name then local hum = character:FindFirstChild("Humanoid") hum.RootPart.CFrame = v.Cookie.CFrame + Vector3.new(0,5,0) end end end)
Since you're getting the raw CFrame
of the Cookie part rotation will also be applied, since you don't want this to happen you can instead get the position of the part so rotation wont be applied.
player.CharacterAdded:Connect(function(character) wait() for i,v in pairs(findBase) do local owner = v:FindFirstChild("Owner") if v.Owner.Value == character.Name then local hum = character:FindFirstChild("Humanoid") hum.RootPart.CFrame = CFrame.new(v.Cookie.Position) + Vector3.new(0,5,0) end end end)