I’m not sure where to post this, normally I’d post it in the Roblox forums but they seem to have removed that, but I just want to find out why neither of these work, the script is inside StarterCharacterScripts:
local ut = script.Parent:FindFirstChild(“UpperTorso”)
if ut then
ut.CFrame = CFrame.new(0, 100, 100)
end
or
local ut = script.Parent:WaitForChild(“UpperTorso”)
ut.CFrame = CFrame.new(0, 100, 100)
You have to wait for the character to be parented to the workspace, you should also change the CFrame of the HumanoidRootPart, not a part of the torso.
This should work:
local hrp = script.Parent:WaitForChild("HumanoidRootPart")
repeat wait() until script.Parent.Parent == workspace
hrp.CFrame = CFrame.new(0, 100, 100)
Default spawn system is bad. It continually tries to force the character to where it thinks it should spawn, so you’re going to need to fight back:
Check for when character has moved
Far away? Teleport character back – spawn system being naughty
Close? Stop listening. Player has walked off spawn
You’re also going to run into issues because R15 avatars are wonky. First Roblox loads in the no-package body, and then if the player has a package equipped it removes the block limbs and replaces them with the new limb. This will result in you moving the wrong torso that’s no longer being used. I’d recommend using the HumanoidRootPart instead, and if you ever need to use R15 limbs, wait for CharacterAppearanceLoaded to fire first to ensure the limbs are final.
It’d be great if we could like set a custom spawning function or something for the player:
player:SetCustomSpawnFunction(function(character)
local root = character:WaitForChild("HumanoidRootPart")
root.CFrame = CFrame.new()
end)
In fact it’d be great if we were able to utilise the in-built character system in general for custom characters, etc. (e.g. player:SetCharacterModel(model, loadAppearanceFunction))
Maybe this is feature request material
Also, OP, you may want to use the HumanoidRootPart instead of the UpperTorso so you can work with R6 and use a designed-to-be-consistent part of the character.
Default spawn system sucks for a lot of reasons. One way that sticks out to me is that the system treats non-collidable parts the EXACT SAME WAY as collidable parts, meaning any triggers you make have to be super awkward.
Yeah but like Echo said, that doesn’t disable the default spawning system so they conflict (and the since the default system is designed to be robust, it usually comes out on top unless you do things in a specific way).
The default system is the reason this entire topic was made