Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Creating a kick gear?

Asked by 5 years ago

Hi this kick tool work only in studio idk how to fix this I tried some ways but i have this same problem, this is animation with moving the anotherplayer kicked, i need help

local debris = game:service("Debris")

Go = false
Kick = false
script.Parent.Selected:connect(function(m) 
m.Button1Down:connect(function() 
if Go == true then return end
Go = true
if script.Parent.Parent.Parent.Character == nil then return end
if script.Parent.Parent.Parent.Character:findFirstChild("Torso") == nil then return end
if script.Parent.Parent.Parent.Character:findFirstChild("Right Leg") == nil then return end
Torso = script.Parent.Parent.Parent.Character.Torso
RL = script.Parent.Parent.Parent.Character["Right Leg"]
Hip = Torso["Right Hip"]
Hip.Part1 = nil
W = Instance.new("Weld")
W.Parent = RL
W.Part0 = Torso
W.Part1 = RL
W.C0 = CFrame.new(0.5,-1.5,0.5) *  CFrame.fromEulerAnglesXYZ(-math.pi/4,0,0)
wait(0.5)
Kick = true
W.C0 = CFrame.new(0.5,-1.5,-0.5) *  CFrame.fromEulerAnglesXYZ(math.pi/6,0,0)
RL.Touched:connect(function(hit)
if Kick == false then return end
if hit.Locked == true or hit.Anchored == true then return end
F = Instance.new("BodyVelocity")
F.Parent = hit
F.velocity = RL.CFrame.lookVector * 98
F.maxForce = Vector3.new(1e+006,35,1e+006)
debris:AddItem(F,0.5)
end)
wait(0.5)
Kick = false
W:Remove()
Hip.Part1 = RL
Go = false
end) 
end)
0
I do not think it is FE compatible. Oficcer_F 207 — 5y
0
Please properly indent your code! User#21908 42 — 5y
0
Also, instead of using script.Parent.Parent.Parent a million times, why don't you create a variable? User#21908 42 — 5y
0
HopperBins are deprecated. This isn't 2014! User#19524 175 — 5y
View all comments (2 more)
0
Instead of using `Tool.Selected`, use `Tool.Equipped` iiOmqLeetHyackth101 0 — 5y
0
Many things wrong with this code, seems like a free model to me heck ! But some many deprecated members of services, and like they said, it's obviously a FE(Filter Enabled) problem . Next_Byte 21 — 5y

Answer this question