Hello, I always wanted to learn how to make a script where it makes a brick move another brick.
It is like how a regen button regenerates bricks. I've always wanted to learn how it worked.
Thanks for reading.
He mean this how can he can he step on a brick and then make another part in the game move.
To do this he would need to add two brick to the game name one of the brick something like ham once he has done this he will need to add a script to the brick that's name is not ham and add this script.
move = script.Parent.Parent.ham -- name that variable whatever you want function onTouched(hit) move.CFrame = CFrame.new(0,0,1) end script.Parent.Touched:connect(onTouched)
Please up my rep! Some trollers have downed it but I am just trying to help
I believe what happens is that you make a script inside a model that contains the model and the regen button. So it would be like
Workspace Clone Model Regen Script (script) Regen Button (part) Tank Model (Model full of parts)
The regen script would identify the button and model.
button = script.Parent.Regen_Button tank = script.Parent.Tank_Model
Then you would make a function and it regen the model. (this is basic guidelines, don't expect it to work if you copy and paste)
function clonemodel () for tank, v in pairs do part:clone() end end button.Touched:connect(clonemodel)