Hey guys and gals, today I have a problem. Again! I was trying to script something that when you touch a part, it will delete a tool in your inventory and then show a model. I got up to the point where it would remove the tool, but I haven’t been able to put transparency to 1 on all the baseparts in the model.
In short, when you touch a part, it should find the models children and then change the transparency to 0 on all of them (Making them visible.)
local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
if player then
local backpack = player:FindFirstChild("Backpack")
if backpack then
local flower =backpack:FindFirstChild("Flower")
if flower then
local children = workspace.StaticFlower1:GetChildren()
for i, child in ipairs(children) do
if child:IsA("Part") then
I put a few print statements in, but the only one that prints is the first one, which prints the parent of the player variable.