I'm trying to make a force choke script but nothing happens. No errors show in output either.
-- Created by Avectus
wait(5)
-- Variables
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local walkspeed = Player.Character["Humanoid"].WalkSpeed
local choking = script.choking
local choker = script.chokerAnim
local chokerAnim = Player.Character["Humanoid"]:LoadAnimation(choker)
local chokeable = script.chokeable
Mouse.KeyDown:connect(function(key)
if key == "r" then
if chokeable == true then
chokeable = false
local enemy = Mouse.Target.Parent:FindFirstChild("Humanoid")
if enemy ~= nil then
local chokingAnim = Mouse.Target.Parent:FindFirstChild("Humanoid"):LoadAnimation(choking)
wait()
chokingAnim:Play()
chokerAnim:Play()
walkspeed = 0
enemy.WalkSpeed = 0
for i = 0, 10 do
enemy.Parent.Torso.CFrame = enemy.Parent.Torso.CFrame + Vector3.new(0, 0.3, 0)
wait(0.1)
end
enemy.Parent["Torso"].Anchored = true
for i = 0, 10 do
enemy.Health = enemy.Health - 5
wait(0.2)
end
chokeable = true
chokingAnim:Stop()
chokerAnim:Stop()
walkspeed = 16
enemy.WalkSpeed = 16
enemy.Parent["Torso"].Anchored = false
end
end
end
end)
Could someone please tell me why?
Thanks.

3 comments
-1 point for...?
http://prntscr.com/7ep5oi I get -1 point and this guy doesn't?!
what is script.Choking? That doesnt make any sense.