#How to Ragdoll Something if the hitbox touches it (similar to tsb's normal punch if yk)
4 messages · Page 1 of 1 (latest)
i have my code for the skillset
its a server script
local UIS = game:GetService("UserInputService")
local rs = game:GetService("ReplicatedStorage")
local event = rs:FindFirstChild("SkillEvent")
local Players = game:GetService("Players")
event.OnServerEvent:Connect(function(plr)
local debounce = true
local CFrame1 = plr.Character.HumanoidRootPart.CFrame
local part = Instance.new("Part", workspace)
part.Size = Vector3.new(5 , 5 , 5)
part.Transparency = 0.5
part.Color = Color3.new(1, 0, 0)
part.Touched:Connect(function(otherpart)
part.CanCollide = false
part.CanTouch = true
part.CanQuery = false
part.CFrame = CFrame1 * CFrame.new(0 , 0 , -6)
game.Debris:AddItem(part , 0.4)
part.Touched:Connect(function(hit)
local i = hit.Parent:FindFirstChild("Humanoid")
if hit.Parent == plr.Name then
i:TakeDamage(0)
elseif hit.Parent ~= plr.Name and debounce == true then
i:TakeDamage(5)
debounce = false
i.Parent:Move(Vector3.new(0 , 100 , 0))
task.wait(1)
debounce = true
end
end)
end)
end)```