#touched:connect
8 messages · Page 1 of 1 (latest)
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
What if you use IsA?
is a instead of if?
shouldnt you use hit.Parent instead of hit.parent
both functions the same
oh wait they dont