its not detecting because you are dealing with anchored parts, touched stops working when you involve anchored parts thats why touched event is horrible and its also unresponsive.
local nuke = game.Workspace:FindFirstChild("Nuke")
Nuke.Touched:connect(function(hit)
if hit.Name == "Baseplate" then
print("test")
end
end)
Well, umm… thank you so much for helping me I really appreciate it. But rn is really late for me its 3:17am SGT and I had to sleep haven’t slept for like 10-12 hours since 11am in the morning. I guess I will reach out to you tomorrow. GN
local missile = script.Parent
local debounce = false
missile.Touched:Connect(function(hit)
if hit.Name == "Part" and not debounce then
debounce = true
local explosion = Instance.new("Explosion",game.Workspace)
explosion.Position = missile.Position
missile:Destroy()
end
end)
I tested this code, the floor that it touches is anchored but the missile isn’t anchored because touched events dont work if the object that’s using the touched event is anchored. the name of the object I want it to touch is correct which is “Part” and it falls and hits the ground and explodes
the global script is located inside of the rocket
touched event is good for simple things like this but when you start messing around with more complex things involving detection you should consider using worldroot raycast (example: detecting a ledge using raycasts to climb ledges in a parkour system)
Check if you have both the nuke and baseplate CanTouch property true, if it doesn’t work then try to weld a part in front of the nuke and then check if the baseplate touches the part