I am trying to fix a poke check script in the game I am working on as I added some new animations. It is a bit glitchy at the moment and I don’t know how to fix it? How would I make it so the blade is fully on the ground and straight in front of you?
How it is without animations and how I want it to be:
Lefty Stick:
Righty Stick:
The Code I use for the pokecheck and some other keybinds. (E is pokecheck)
local Tool = script.Parent;
local walking = 0
local hold
local walk
local walk2
local walk3
local walk4
local walk5
local walk6
local walk7
local walk8
local walk9
local walk10
local walk11
local walk12
local walk13
local walk14
enabled = true
function onButton1Down(mouse)
if not enabled then
return
end
if script.Parent.blade.Transparency == 0 then --blade on
script.Parent.blade.Transparency = 1 --blade off
script.Parent.blade.CanCollide = false
script.Parent.blade2.Transparency = 0 --blade2 on
script.Parent.blade2.CanCollide = true
else
script.Parent.blade2.Transparency = 1 --blade off
script.Parent.blade2.CanCollide = false
script.Parent.blade.Transparency = 0 --blade off
script.Parent.blade.CanCollide = true
end
enabled = true
end
function onKeyDown(key)
if walk and (key == "a") or (key == "d")then
walk:Play()
walking = walking + 1
end
if walk2 and (key == "s") then
walk2:Play()
walking = walking + 1
end
if walk3 and (key == "w") then
walk3:Play()
walking = walking + 1
end
if walk4 and (key == "q") then
walk4:Play()
walking = walking + 1
end
if walk5 and (key == "x") then
walk5:Play()
walking = walking +1
Tool.GripForward = Vector3.new(-0.081, -0.983, 0.166)
Tool.GripRight = Vector3.new(0.035, 0.163, 0.986)
Tool.GripUp = Vector3.new(0.996, -0.086, -0.021)
Tool.GripPos = Vector3.new (0.07, 2.369, 0.078)
wait (3)
Tool.GripForward = Vector3.new(0, 0, -1)
Tool.GripRight = Vector3.new(1, 0, 0)
Tool.GripUp = Vector3.new(0, 1, 0)
Tool.GripPos = Vector3.new (0, 0, 0)
end
if walk6 and (key =="e") and script.Parent.E.Value == false then
walk6:Play()
walking = walking +1
Tool.GripForward = Vector3.new(0.513, -0.843, 0.164)
Tool.GripRight = Vector3.new(0.5, -0.072, 0.091)
Tool.GripUp = Vector3.new(0.755, 0.534, 0.381)
Tool.GripPos = Vector3.new (-0.024, 2.542, -0.045)
script.Parent.E.Value = true
elseif walk6 and (key =="e") and script.Parent.E.Value == true then
Tool.GripForward = Vector3.new(0, 0, -1)
Tool.GripRight = Vector3.new(1, 0, 0)
Tool.GripUp = Vector3.new(0, 1, 0)
Tool.GripPos = Vector3.new (0, 0, 0)
script.Parent.E.Value = false
end