I am using the following script to clone a model from ServerStorage to the player’s LowerTorso. The script works as expected, by cloning the model, putting it in the player’s LowerTorso, and welding it to that limb. But, assigning the model’s position to be that of the players LowerTorso doesn’t seem to work.
I have tested the script with two fresh parts, welded together, just to make sure it wasn’t an issue with the model I am using. My best guess would be that the problem is with the line of code which assigns the model’s CFrame to be the same as the LowerTorso CFrame. I get no errors with the script, so I must be doing something else incorrectly. Here is the script:
local TailSource = game.ServerStorage.Blocks
local function onCharacterAdded(character)
local TailModel = TailSource:Clone()
wait(1)
TailModel.PrimaryPart = TailModel.RootPart
TailModel.PrimaryPart.CFrame = character.LowerTorso.CFrame
TailModel.Parent = character.LowerTorso
local Weld = Instance.new("WeldConstraint")
Weld.Parent = character.LowerTorso
Weld.Part0 = TailModel.PrimaryPart
Weld.Part1 = character.LowerTorso
end
local function onPlayerAdded(player)
player.CharacterAdded:Connect(onCharacterAdded)
end
game.Players.PlayerAdded:Connect(onPlayerAdded)