-
What do you want to achieve? Keep it simple and clear!
I want to make a quicksand system where the part follows the character so it looks like the character is slowly sinking and I want the part to be under the character. -
What is the issue? Include screenshots / videos if possible!
The part is not positioning itself under the character but it’s feet.
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve looked around the devforum and the internet in general for around 2 hours and not found anything.
what’s your current script? cant you just use a loop to keep changing the part’s position in relation to the character while they are sinking in the quicksand
Yes, that’s what I’m currently doing. I’m setting the CFrame based on the character’s bounding box which for some reason places the part on the character’s feet and not under the character if you know what I mean.
if you want to keep a part under a character feet you can try to use welds and position the part with a pre-calculated offset so first you need to place your part near your character feet and calculate the offset, for example i want to weld a part and humanoidrootpart of a character and keep their position so the code will look something like this:
First place the part under the feet of your character then do offset=humanoidrootpart.CFrame:Inverse()*part.CFrame
For welding i use the following code
local startpos---value i already calculated
local part=Instance.new("Part")
local weld=Instance.new("Weld")
part.CanCollide=false
weld.Parent=part
weld.Part0=humanoidrootpart
weld.Part1=part
weld.C0=startpos
part.Parent=game.Workspace
Above process in video format and result
Thank you for your reply. I’ll try this when I have time!