#touched:connect

8 messages · Page 1 of 1 (latest)

vocal remnant
#

So i made a model with a bunch of parts, and made a script that activates when another part touches the model, and its not working

#
local part = script.parent

part.touched:Connect(function(hit)
    local  Humanoid = hit.parent:FindFirstChild("Humanoid")
    local parttouch = hit.parent:FindFirstChild("part")
    if Humanoid or parttouch then
    local RocketExplosion = Instance.new("Explosion")
    RocketExplosion.Parent = workspace
    RocketExplosion.Position = rocket.Position
    rocket.parent = game.ReplicatedStorage



    end
end)```
#

parttouch doesnt activate when the model is touched

half mason
#

What if you use IsA?

vocal remnant
tulip vortex
#

shouldnt you use hit.Parent instead of hit.parent

vocal remnant
#

oh wait they dont