Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
Anto3oo 13
5 years ago

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

1
Have you looked at the documentation for CFrame? User#6546 35 — 5y
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. User#6546 35 — 5y
1
i tried script.Parent.Steel.Cframe(0,+1,0) but it doesnt move at all Anto3oo 13 — 5y
0
Try CFrame.Angles 2ndwann 131 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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

Ad

Answer this question