local ReplicatedStorage = game:GetService("ReplicatedStorage")
local EMoveEvent = ReplicatedStorage:WaitForChild("EMoveEvent")
local Players = game:GetService("Players")
EMoveEvent.OnServerEvent:Connect(function(player)
local character = player.Character
if character then
local humrp = character:WaitForChild("HumanoidRootPart")
if humrp then
local forwardVector = humrp.CFrame.lookVector
local newPosition = humrp.CFrame.p + forwardVector * 100
local hitboxPart = ReplicatedStorage:WaitForChild("EMoveHitbox"):Clone()
hitboxPart.Parent = workspace
hitboxPart.Position = newPosition
local anchoredHumrp
humrp.Anchored = true
wait(1)
humrp.Anchored = false
task.spawn(function()
while hitboxPart:IsDescendantOf(workspace) do
local partsInPart = workspace:GetPartsInPart(hitboxPart)
#HumanoidRootPart not being anchored
12 messages · Page 1 of 1 (latest)
for i, part in pairs(partsInPart) do
if part.Name == "UpperTorso" then
local humInHitbox = part.Parent:FindFirstChild("Humanoid")
if humInHitbox and humInHitbox.Parent ~= player.Character then
humInHitbox.Health = humInHitbox.Health - 10
if player.UserId == 498997820 then
anchoredHumrp = humInHitbox.Parent:FindFirstChild("HumanoidRootPart").Anchored
anchoredHumrp = true
end
end
end
end
wait(1)
end
end)
wait(10)
if anchoredHumrp == true then
anchoredHumrp = false
end
hitboxPart:Destroy()
end
end
end)