i think i need to put the dmg in the touched function, but i dont know what to write. Help.
here is the script:
local Tool = script.Parent
Tool.RemoteEvent.OnServerEvent:Connect(function(Player, Debounce)
local AlreadyTouched = false
local Character = Player.Character
Debounce = true
local Barrier = Instance.new("Part")
Barrier.BrickColor = BrickColor.new("Lime green")
Barrier.Material = "Neon"
Barrier.Transparency = 0.25
Barrier.Anchored = false
Barrier.Size = Vector3.new(8,13,1)
Barrier.Shape = Enum.PartType.Block
Barrier.Locked = true
Barrier.CanCollide = false
Barrier.CFrame = Character.HumanoidRootPart.CFrame
Barrier.Parent = Character
local bv = Instance.new("BodyVelocity")
bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
bv.Velocity = Character.HumanoidRootPart.CFrame.lookVector * 25
bv.Parent = Barrier
Barrier.Touched:Connect(function(hit)
end)
wait(5)
Barrier:Destroy()
Debounce = false
end)

1 comment
i didnt want the barrier to kill me too........