Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is there a way of changing cframe before part is cloned?

When it get cloned, there is a slight delay and it really bugs the game. Is there a way to change the cframe before it gets cloned so that "tycoon" is already at mouse hit position when cloned?

script.Parent.MousePosScript.ignore.Value = tycoon
tycoon.Parent = game.Workspace
tycoon.CFrame = tycoon.CFrame:ToWorldSpace(turnDegrees)

1 answer

Since code runs from top to bottom, you just swap them, part is only becoming visible after Parent property is set to something in Workspace:

script.Parent.MousePosScript.ignore.Value = tycoon
tycoon.CFrame = tycoon.CFrame:ToWorldSpace(turnDegrees)
tycoon.Parent = game.Workspace

6 comments

0

tip: think of code as noodles

0

its still the same thing

0

(not the same, just doesnt work anymore)

0

what do you mean it does not work, in what way? it errors or the cframe does not change at all?

0

no errors, it just doesnt work

0

it works with position but not cframe

This discussion is preserved as it was. New answers, comments, and votes are closed.