When a player touch an brick their head of the turn bigger and big small after 12 seconds But its doesn't work what is wrong?
local ting = 0 function onTouched(hit) if ting == 0 then ting = 1 check = hit.Parent:FindFirstChild("Humanoid") v=hit.Parent:FindFirstChild("Torso") if check ~= nil then function sepuku() script.Parent = nil end if (check == nil) then sepuku() end local head = script.Parent:FindFirstChild("Head") if (head == nil) then sepuku() end local m = head:FindFirstChild("Mesh") if (m == nil) then sepuku() end local oldColor = head.BrickColor local oldScale = m.Scale head.BrickColor = BrickColor.Random() for i=1,10 do m.Scale = m.Scale * 1.05 wait(.1) end wait(12) for i=1,10 do m.Scale = m.Scale / 1.05 wait(.1) end m.Scale = oldScale head.BrickColor = oldColor script.Parent = nil end wait(1) ting = 0 end end script.Parent.Touched:connect(onTouched)