Tool Grip Rotation Not Changing

  1. What do you want to achieve? Keep it simple and clear!

    To make a tool rotate smoothly.

  2. What is the issue? Include screenshots / videos if possible!

    It says that rotation can not be assigned to.

    Screenshot 2023-09-01 at 4.42.06 PM

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

    I looked for about an hour, couldn’t find anything. I also looked into the classic sword that Roblox makes in the toolbox, but it was not smooth.

I want to change the grip’s rotation by about 5 per frame (it’s already in a run service stepped function), and when the tool grip is all the way down it stops.

if Lunging == true then
	script.Parent.Grip.Rotation = Vector3.new(script.Parent.Grip.Rotation.X - 5, 0, 0)
	
	if script.Parent.Grip.Rotation.X <= 0 then
		Lunging = false
	end
end


Thanks!

I’m pretty sure you aren’t able to change the tool’s grip rotation when the game is already running, so your method isn’t possible. However you could make an animation using TweenService

I got it figured it out, using CFrames and a variable to change the grip rotation. I was trying to be too smart about it, so I didn’t think about it before posting this. Sorry!

Here is my code:

if Lunging == true then
	wait()
		
	script.Parent.Grip = CFrame.fromEulerAnglesYXZ(math.rad(LungeAnim * 6), 0 ,0)
	LungeAnim += 1
		
	if LungeAnim >= 15 then
		Lunging = false
		
		wait(.25)
		
		script.Parent.Grip = CFrame.fromEulerAnglesYXZ(0, 0 ,0)
	end
end


Thanks for helping!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.