I am making a sword, and it is supposed to change the grip every time you swing, and it isn’t changing.
I have tried doing one at a time to see if it works, nothing. Doesn’t even spit anything out
Here is my script:
tool.Activated:Connect(function()
if debounce == false and SwingDetector.Value ~= true then
debounce = true
tool.GripForward = Vector3.new(-1, -0, -0)
tool.GripPos = Vector3.new(-0, 0, -1.5)
tool.GripRight = Vector3.new(-0, 0.5, 0.866)
tool.GripUp = Vector3.new(-0, -0.866, 0.5)
wait(0.4)
tool.GripForward = Vector3.new(-1, 0, 0)
tool.GripPos = Vector3.new(0, 0, -1.5)
tool.GripRight = Vector3.new(0, 1, 0)
tool.GripUp = Vector3.new(0, 0, 1)
wait(0.5)
debounce = false
SwingDetector.Value = true
elseif debounce == false and SwingDetector.Value ~= false then
debounce = true
--toolgrip1
tool.GripForward = Vector3.new(-1, -0, -0)
tool.GripPos = Vector3.new(-0, 0, -1.5)
tool.GripRight = Vector3.new(-0, 0.5, -0.866)
tool.GripUp = Vector3.new(-0, 0.866, 0.5)
--wait
wait(0.4)
--toolgripdefault
tool.GripForward = Vector3.new(-1, 0, 0)
tool.GripPos = Vector3.new(0, 0, -1.5)
tool.GripRight = Vector3.new(0, 1, 0)
tool.GripUp = Vector3.new(0, 0, 1)
wait(0.5)
SwingDetector.Value = false
end
end)
Sorry for the long script. Anything is appreciated.