Alright, I'm trying to make a spear which will jab from scratch, but have encountered a bit of an issue -- how do I deal with "animating" a tool through the GripPos rotation options?
I'm currently using this as my script --
local debouncea = false local gripos = script.Parent.GripPos local damage = 55 script.Parent.Activated:connect(function() print("Running") if not debouncea then debouncea = true for i = 1,4 do print(i) gripos = CFrame.new(gripos.X, gripos.Y, (script.Parent.GripPos.Z + -.2)) wait() end wait(.25) for i = 1,4 do gripos = CFrame.new(gripos.X, gripos.Y, (script.Parent.GripPos.Z - -.2)) wait() end debouncea = false end end)
I'm not very good with tools, and the wiki lacked in-depth documentation on this subject. Chances are, I'm just approaching this the wrong way. This isn't doing anything (except the prints are just fine).
Thanks for reading, and I hope to find a solution!
The problem here is that when you are trying to change the 'gripos' you are only changing the variable, try script.Parent.GripPos = CFrame.new(gripos.X,gripos.Y,(script.Parent.GripPos.Z - -.2))