TakeDamage is not a valid member of Model?
I've made a box that spawns infront of the player and damages any other players, however instead of damaging players I just get this error: "TakeDamage is not a valid member of Model"
01 | local HB = game.ServerStorage.HB 1 :WaitForChild( "H1" ) |
02 | local Character = player.Character |
03 | local Hitb = HB:Clone() |
04 | Hitb.CFrame = Character.HumanoidRootPart.CFrame * CFrame.new( 0 , 0 ,- 5 ) |
05 | Hitb.Parent = workspace |
07 | Touch = Hitb.Touched:connect( function (hit) |
08 | if hit.Parent:FindFirstChild( "Humanoid" ) then |
09 | if hit.Parent.Name ~ = player.Name then |
10 | hit.Parent:TakeDamage( 15 ) |
11 | if Touch ~ = nil then Touch:Disconnect() end |