I’m doing a kind of transformation from a server script but when I clone a part and give it its position, the object remains where it was.
my code here:
scp323orbe:Clone().Parent = workspace
if humanoid.Health > 0 then
local orbetransform = workspace:WaitForChild("scp323efectos")
--this is where it doesn't work
orbetransform.CFrame = CFrame.new(humanoidrootpart.Position)
I have the complete code but it is long, I only put that part of the script because that is where it does not work, I don’t get an error or anything but it just doesn’t work
My only guess is that “scp323efectos” doesn’t actually exist and “WaitForChild” is running indefinitely. Make sure the part is actually named “scp323efectos” since nothing is actually wrong with the code.
If it happens to be a “Model” instance then consider using “MoveTo()” instead.
Edit: Another thing you can do is use a variable to clone your part, and use the variable as the object data to move the part.
local part = scp323orbe:Clone()
part.Parent = workspace
if humanoid.Health > 0 then
part.CFrame = CFrame.new(humanoidrootpart.Position)
end