So i have this code here, and what its supposed to do is that if the part is touching this model called car, then every one second it should explode. The thing is, its neither exploding nor waiting for 1 second. Can any one help me plz?
local RESET_SECONDS = 1
local isTouched = false
if not isTouched then
isTouched = true -
script.Parent.Touched:Connect(function(obj)
if obj:IsDescendantOf(workspace.car) then
local explosion = Instance.new("Explosion")
explosion.BlastRadius = 1000000
explosion.Parent = game.Workspace
explosion.Position = script.Parent.Position
print('model touched')
else
print("couldn't find model")
end
wait(55)
end)
wait(RESET_SECONDS)
isTouched = false
