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

How would I go on about to merge these two small scripts?

I am trying to make it so that the model always remains at the CFrame my lower torso is at, while having it rotate at the same time. Please tell me how I can merge these two scripts, as I've tried myself without much luck.

CFrame position script:

local FA = game.ServerStorage.FireAura:Clone()
FA.Parent = workspace
FA.PrimaryPart = FA.Primary


while true do
	wait()
		FA:SetPrimaryPartCFrame(Player.Character.LowerTorso.CFrame)
		

end

Rotation script:

FA = workspace.FireAura
FA.PrimaryPart = FA.Primary

while true do
	script.Parent:SetPrimaryPartCFrame(script.Parent.Primary.CFrame * CFrame.fromEulerAnglesXYZ(0,0.1,0))
	wait()
	
end

Thank you.

1 answer

Have you tried this? :

local FA = game.ServerStorage.FireAura:Clone()
FA.Parent = workspace
FA.PrimaryPart = FA.Primary


while true do
    wait()
        FA:SetPrimaryPartCFrame(Player.Character.LowerTorso.CFrame)
	script.Parent:SetPrimaryPartCFrame(script.Parent.Primary.CFrame * CFrame.fromEulerAnglesXYZ(0,0.1,0))
end

although I'm not sure what the rotation script's parent is so it might not work.

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