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

How do i make a tool to rotate a part?

Asked by
Anto3oo 13
5 years ago

So guys , im back and with another question , how do a tool to rotate a part constantly (that its on the tool) until tool is unequipped? , i dont know if this helps you but the part i want to move is unanchored and welded , so here is the script.

script.Parent.Activated:Connect(function()

script.Parent.BRMM:Play()

local animation = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack) 

animation:Play()

script.Parent.Tape.Transparency = 1

script.Parent.STape.Transparency = 1

local Steel = script.Parent.Steel.Orientation.X

Steel +1 until script.Parent.Unequipped

wait (3.5)

script.Parent.Tape.Transparency = 0

script.Parent.STape.Transparency = 0

end)

script.Parent.Unequipped:Connect(function()

script.Parent.BRMM:Stop()

end)

sorry to bother! thanks for reading

0
What are you trying to do exactly? As there are probably better ways to do this. AizakkuZ 226 — 5y
0
when the tool is activated (click when the tool is equipped) then a part that is inside of the tool rotates until the tool is unequiped Anto3oo 13 — 5y

1 answer

Log in to vote
-1
Answered by 5 years ago
Edited 5 years ago

Hello this is easy, so, make a script inside tool with this code in it:

can = false
tool.Equipped:Connect(function()--so only when equipped it works
can = true
end)
tool.Unequipped:Connect(function()
can = false
end)
script.Parent.Activated:Connect(function()--click and it will do what ever you put next
if Mouse.Cursor == Classname("Part") and can == true then--this is just a shell, look up how to find cursor point, and find class name, becasue if your aiming at sky, sky is not a part, so it would do errors
--[=[then]=] Part.Orientation = Part.Orientation + vector3.new(?,?,?)
0
if its tool then same thing, script.Parent.Part.Orientation CommanderCaubunsia 126 — 5y
0
Activated only runs when the tool is Equipped. pls check the wiki. User#5423 17 — 5y
0
Thanks! basically my game is entirelly sky and i dont want errors , could you do it so i can click at sky without errors? Anto3oo 13 — 5y
Ad

Answer this question