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

How do i rotate a part that is inside on a tool when i have clicked while holding the tool?

Guys im back ! , i know its pretty confusing but i just want to rotate a part called "steel" . but how do i rotate it?


script.Parent.Activated:Connect(function() script.Parent.BRMM:Play() local animation = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack) script.Parent.Tape.Transparency = 1 script.Parent.STape.Transparency = 1 wait (3.5) script.Parent.Tape.Transparency = 0 script.Parent.STape.Transparency = 0 script.Parent.Steel.Cframe= 2 --I dont have any clue , sorry :( end) script.Parent.Unequipped:Connect(function() script.Parent.BRMM:Stop() end)

The location of the part is > script.Parent.Steel but  i dont have any idea how to rotate things with scripts , thank you for reading

4 comments

1

Have you looked at the documentation for CFrame?

1

What is it that you're not understanding about CFrames? This should definitely be a CFrame question. I don't think you've tried at all here.

1

i tried script.Parent.Steel.Cframe(0,+1,0) but it doesnt move at all

0

Try CFrame.Angles

1 answer

i hope it helps:

script.Parent.Activated:Connect(function()
	script.Parent.BRMM:Play()
	 local animation = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack)
 	script.Parent.Tape.Transparency = 1
 	script.Parent.STape.Transparency = 1
	wait (3.5)
	script.Parent.Tape.Transparency = 0
	script.Parent.STape.Transparency = 0
	script.Parent.Steel.Cframe = CFrame.new(script.Parent.Steel.CFrame.p,Vector3.new(0,0,0))
end)
script.Parent.Unequipped:Connect(function()
	script.Parent.BRMM:Stop()
end)

if it helped, accept the anwser :D

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