Hello,the point of this script was that when the user clicked a button it will loop through workspace and find all the parts named "jumpart" and raise them i did some troubleshooting and it seemed that the problem arised from the second for loop, where [i] is set to the default height of the brick. I get the error x is not a valid member of Part. I thought about using tables but i did not think it will really help. Thanks for taking your time to read this post.
Debounce=false function onClicked() children=game.Workspace:GetChildren() if not Debounce then Debounce=true for i,v in pairs(children)do if v.Name=="jumpart" then for i=4,13 do v.Size=Vector3.new(v.x,i,v.z) end end end Debounce=false end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
You need to get the X and Z property from the .Size property of the part.
v.Size = Vector3.new(v.Size.X, i, v.Size.Z)