I’m trying to tween a part’s position in relation to the Humanoid’s RootPart in a custom player character. I’ve tried using both
Position = humanoidRootPart.Position + Vector3.new(*quantity*)
and
Position = humanoidRootPart.CFrame * CFrame.new(*quantity*)
however neither works how I want it to. This is because the actual position of the rootpart is where the character spawns, not where the character actually is ingame. I’ve also tried tweening it off of the position of different parts in the model but still no luck.
Some extra information that may be neccesary:
This is in a LocalScript and needs to be in this localscript as it is part of a larger system that needs to be in a local script
Ideally this should be able to combine with another tween that changes the parts size at the same time
The parts are welded together using WeldConstraints
local HumRootPart
Position = HumRootPart.CFrame * CFrame.New(*Quantity*)
Event.Event:Connect(function() -- or whatever you want
HumRootPart = humanoidRootPart.Position
tween:Play()
end)
If this errors out because HumRootPart isn’t a value try just defining the Position a tiny bit before you start the tween instead of when the player joins
Unfortunately this solution still moves it to the spawnpoint, however I do think you’re right about it defining the humanoidRootPart.Position when it spawns and just keeping that, as I’ve done a test that prints the position of the humanoidRootPart every second, and the game does recognise this new position.
I’ll experiment with this and hopefully it’ll work! Thanks for pointing this out, I doubt I’d have realised that on my own.