Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How could i make this Model Visible when touched part script work? Dont know how to do it!

Asked by
Zjyuak -1
4 years ago

Hi There, Today im trying to make a secret for my game, the secret is: When you touch a part eg. Mushroom it then makes a model visible (Model is already transparent). I want to know if i can make a short script and also try fit in a how to make a model visble If you could help, It would be very helpful

1 answer

Log in to vote
0
Answered by 4 years ago

Well first of all You can use i,v in pairs to get all children of the model, and you need to use the touched function obviously lol

game.Workspace.Part.Touched:Connect(function() -- the part you touch
for i,v in pairs(game.Workspace.MODELNAME:GetDescendants()) do -- gets the model
if v:IsA("Part") then
v.Transparency = 0
v.CanCollide = true
        end
    end
end)
Ad

Answer this question