So for some reason, my block won’t detect if something touches it for some reason.
(The rocket explodes and fires a remote event to the server to break the part)
It only works if I touch the block.
I also tried other codes
Client Code:
print("start") -- works
script.Parent.Touched:Connect(function(hit)
print(hit) -- doesn't work
end)
-------------------------------------------------
local RunService = game:GetService("RunService")
RunService.Heartbeat:Connect(function()
local touchingParts = script.Parent:GetTouchingParts()
for _, touchingPart in ipairs(touchingParts) do
print(touchingPart) -- works
end
end)
Image:
Video:
It only works if I set it to the server:
Can someone help me