#sink waterflow

1 messages · Page 1 of 1 (latest)

gaunt hornet
#

guys im tryng to make a sink that makes water appear but you have to turn it off before it prints ur name, but the problem is i wanna make act like real water where if the water is already there when i turn it off it stays there but idk how to do that

local water1 = game.Workspace.water1 -- tried to make it so that if i pressed the button after there was already water the water wouldnt dissapear but i couldnt figre it out
local water2 = game.Workspace.water2
local water3 = game.Workspace.water3
local water4 = game.Workspace.water4
local water5 = game.Workspace.water5
local water6 = game.Workspace.water6
local water7 = game.Workspace.water7

local bblue = game.Workspace.bblue

game.Players.PlayerAdded:Connect(function(player)
    task.wait(3)
    water1.Transparency = 0
    task.wait(0.5)
    water2.Transparency = 0
    task.wait(0.5)
    water3.Transparency = 0
    task.wait(0.5)
    water4.Transparency = 0
    task.wait(0.5)
    water5.Transparency = 0
    task.wait(0.5)
    water6.Transparency = 0
    task.wait(0.5)
    water7.Transparency = 0
    
    bblue.Touched:Connect(function()
        water1.Transparency = 1
        water2.Transparency = 1
        water3.Transparency = 1
        water4.Transparency = 1
        water5.Transparency = 1
        water6.Transparency = 1
        water7.Transparency = 1
    end)
    task.wait(2)
    if water7.Transparency == 0 then
        print(player.Name)  
    end
end)


dry grove
#

i didnt understand quite well what you are trying to do but i see that u are using a lot of task.wait
so maybe something like this would help a little?

local bblue = game.Workspace.bblue

game.Players.PlayerAdded:Connect(function(player)
    task.wait(3)

    for i = 1, 7 do
        workspace["water" .. tostring(i)].Transparency = 0

        if i == 7 then
          task.wait(2)
          print(player.Name)
        end

        task.wait(0.5)
    end
    
    bblue.Touched:Connect(function()
        for i = 1, 7 then
          if workspace["water" .. tostring(i)].Transparency == 0 then 
            continue 
          end

          workspace["Part" .. tostring(i)].Transparency = 1
        end
    end)
end)

#

if you want me to explain something pls tell me

gaunt hornet
dry grove
dry grove
#

Btw did the code work? I wrote it on discord but i didnt test it

#

And im scared that i just send you something that deletes your system 32

tiny skiff
#

Ok that’s good