I have a checkpoint system and every time I join the game or die it respawns me on my side. I need some help, please! Thank you for your time
Is the cylinder the checkpoint? If so, I believe that the top face of the cylinder is actually on its side. I would suggest making an invisible SpawnLocation and turning that cylinder into a normal part.
it would mess up all my scripts, I might need to change the vector3 to something different I assume
Are you teleporting the character manually using scripts or are you using SpawnLocations?
using scripts because spawn locations down work
Okay, then you can just remove the rotation of the checkpoint CFrame, like
root_part.CFrame = CFrame.new(checkpoint.Position + Vector3.new(0, 3, 0))
want me to show you the script?
ocal dataStoreService = game:GetService("DataStoreService")
local PlayerService = game:GetService("Players")
local stageStore = dataStoreService:GetDataStore("PlayerStageDataStore")
local Checkpoints = workspace:WaitForChild("Checkpoints", 30)
function plrToStage(plr)
repeat wait() until plr.Character.HumanoidRootPart
local stagePart = game.Workspace.Checkpoints:FindFirstChild(tostring(plr.leaderstats.Stage.Value))
plr.Character.HumanoidRootPart.CFrame = stagePart.CFrame + Vector3.new(0,10,0)
end
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local stage = Instance.new("IntValue")
stage.Name = "Stage"
stage.Parent = leaderstats
this is how the character will spawn the vector 3 here
You can change this part to this:
function plrToStage(plr)
repeat wait() until plr.Character.HumanoidRootPart
local stagePart = game.Workspace.Checkpoints:FindFirstChild(tostring(plr.leaderstats.Stage.Value))
plr.Character.HumanoidRootPart.CFrame = CFrame.new(stagePart.Position) + Vector3.new(0,10,0)
end
Thank you so much! I had no idea what was going on
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.