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"
local HB = game.ServerStorage.HB1:WaitForChild("H1") local Character = player.Character local Hitb = HB:Clone() Hitb.CFrame = Character.HumanoidRootPart.CFrame * CFrame.new(0,0,-5) Hitb.Parent = workspace Touch = Hitb.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then if hit.Parent.Name ~= player.Name then hit.Parent:TakeDamage(15) if Touch ~= nil then Touch:Disconnect() end Hitb:Destroy() end end end)
You did hit.Parent which is just the Character. You have to do hit.Parent.Humanoid:TakeDamage(15)