local RepStorage = game:WaitForChild("ReplicatedStorage")
local Remote = RepStorage:WaitForChild("Stomp")
Remote.OnServerEvent:Connect(function(player)
local Character = player.Character
local Foot = Character.RightFoot
local Postion = Foot.Position
local Hitbox = Instance.new("Part",Foot)
Hitbox.Size = Vector3.new(.2, 15, 15)
Hitbox.Transparency = 0
Hitbox.Position = Postion
Hitbox.Orientation = Vector3.new(0,0, -90)
Hitbox.BrickColor = BrickColor.new("Really red")
Hitbox.Anchored = true
Hitbox.CanCollide = false
Hitbox.Shape = "Cylinder"
print("Event Finished")
Hitbox:Touched(function(hit)
if not hit.Parent:FindFirstChild("Humanoid") then return end
if hit.Parent.Name ~= Character.Name then
hit.Parent:FindFirstChild("Humanoid"):TakeDamge(36)
wait(2.5)
Hitbox:Destroy()
end
end)
end)
Output error: Touched is not a valid member of part

1 comment
Touched is not a function, it is a event. So instead of Hitbox:Touched(function(hit), you should do like this Hitbox.Touched:Connect(function(hit)