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 make a tool to rotate a part?

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

2 comments

0

What are you trying to do exactly? As there are probably better ways to do this.

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

1 answer

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(?,?,?)

3 comments

0

if its tool then same thing, script.Parent.Part.Orientation

0

Activated only runs when the tool is Equipped. pls check the wiki.

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?

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