I have a clickable brick with a script inside that executes this action when clicked. However, I can't make the water appear or make it go back to it's original position.
function onClicked(playerWhoClicked)
script.Parent.Position = Vector3.new(92, 12.401, 87.5) --91.7, 12.401, 87.2 is original
script.Parent.Rotation = Vector3.new(0, -0, 0) --0, 0, 0 is orignal
script.Water.Transparency = 0.5
wait(3)
script.Parent.Position = Vector3.new(91.7, 12.401, 87.2)
script.Parent.Rotation = Vector3.new(0, 0, 0)
script.Water.Transparency = 1
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
EDIT: This script is inside a brick inside a model. The "Water" in the script is a part inside the model as well

6 comments
NOTE: The "Water" is what the brick is called that I want to appear, and the lines after "wait" won't work
You can edit your question, you know.
Debounce is key.
I feel like a denounce wouldn't be necessary. I'm using a brick that's clicked on instead of touched by the player.
You can still spam click.
So it would "script.Parent.Parent" since the script is inside a brick in the model, correct? No, then you would be moving the whole model itself.