So, because I am not a Member of DevForum, I will have to post my Roblox problems onto here.
Alright. I want to make a flood happen when I click a button. But it didn't work.
Here is my code:
local water = game.Workspace["water-flood"]
local iteration = 0
print("script activated")
script.Parent.Activated:Connect(function()
print("activated")
while water.Size.Y <= 75 do
iteration = iteration + 1
water.Size = Vector3.new(534, iteration * 5, 326)
print(iteration)
print(iteration * 5)
wait(5)
end
if water.Size.Y > 75 then
wait(15)
print("reload")
end
end)
I tried printing when something happened (as you can see with all the print()s) but I've noticed something. The print("activated") does not run when I click the button but print("script activated) runs when I start the game. Why is this?