Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I make a models parts change?

How can I make every part in a model move, rotate and change the transparency level?

Here's what I tried:

local prompt = script.Parent

prompt.Triggered:Connect(function(player) print("hi you triggered me i guess") for i,v in pairs(workspace.Everything.OrganizedThings.Useables.OpenandShut.Vault.Door:GetChildren()) do v.Transparency = 1 for i,v in pairs(workspace.Everything.OrganizedThings.Useables.OpenandShut.Vault.Door2:GetChildren()) do v.Transparency = 0 end)

Thanks :)

  • Mastically

1 answer

Soo you have to first loop through the models childs and decedents just like how im going to show you in my script. Sadly, idk how to rotate parts

local model = game.Workspace.Model

for i, v in pairs(model:GetDecendents()) do
--if you want to move then do this code
if v IsA("Part") then
v.Position = Vector3.new(x,y,z)

--this code for transparency
v.Trasparency = youramount


end




end

2 comments

0

It says GetDecendents is not a valid member of Model "Workspace.Everything.OrganizedThings.Useables.OpenandShut.Vault.Door2

0

i dont get whats wrong then. Sorry

This discussion is preserved as it was. New answers, comments, and votes are closed.