I’ve attempted this, only to be met with the same result, unfortunately. But just to make sure, here’s the current script
Hitbox.Touched:Connect(function(player)
local function Check()
if Handle:GetAttribute("IsActivated") == true then
Count += 1
local Cast = workspace:Raycast(Handle.Position, Handle.CFrame.LookVector * 2)
if Cast then
if Cast.Instance.Name ~= AzureOre.Name then return end
else
return
end
end
repeat task.wait(1) Check() until Count == 5
OreTouchedEvent:FireServer(AzureOre)
Count = 0
end
end)
Hitbox.Touched:Connect(function(player)
local function Check()
if Handle:GetAttribute("IsActivated") == true then
Count += 1
local Cast = workspace:Raycast(Handle.Position, Handle.CFrame.LookVector * 2)
if Cast then
if Cast.Instance.Name ~= AzureOre.Name then return end
else
return
end
end
end
repeat task.wait(1) Check() until Count == 5
OreTouchedEvent:FireServer(AzureOre)
Count = 0
end
end)