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 make this part move but without it moving the player also?

So, I've made a morph, and a simple C-Frame script in a GUI to rotate a part called "aura" repeatably, but it rotates the player with it. I'm guessing it's because it's welded to the player. How do I make it so only the part moves, not the player?

2 comments

1

One solution would be to use a Motor6D and change the rotation of it's C0 or C1 property. It's what are used to weld your Characters arms on but still allow them to move.

0

Masta is right. Just use Motor6D to change the rotation to C1.

1 answer

Here's what I recommend doing, and excuse me if I don't understand what you are trying to do and I got it wrong.

What you have to do to rotate a part in a morph is use a LocalScript (It has to be moved to the player's Backpack, so a "giver" in the morph button would be good for that) with a code somewhat like this.

local character = game:GetService("Players").LocalPlayer.Character
local morphbody = character:WaitForChild("Chest") --I ASSUME IT'S CHEST BECAUSE THAT IS A POPULAR MORPH SYSTEM. CHANGE THIS TO THE NAME OF THE MODEL BEING MORPHED WITH AURA IN IT

morphbody.aura:BreakJoints() --Break it off from the character so that it can move freely

game:GetService("RunService").RenderStepped:connect(function ()
	--This will require some work, you have to find out the CFrame from the character's torso to the "aura" part.
	morphbody.aura.CFrame = Torso.CFrame * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) --Replace CFrame.new(0, 0, 0) with that CFrame from the torso, and the CFrame.Angles() to the GUI rotation value.
end)

If I goofed on the above please PM XanthicDragon

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