Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Trying to make a cup script, yet it won't change the color of the water. Help?

Asked by 9 years ago
--CUP SCRIPT BY CYOTOKATROV--

y = script.Parent
x = game.Workspace
p = game.Players.LocalPlayer
---preset as always

--kk now let's color the liquid state to accurately show us how to drink this.
function ArderRoy()
    if y.Parent.Dyxroid == true then --if the player scoops up some of X then...
        y.Liquid_State.Transparency = 0.5
        y.Liquid_State.BrickColor = BrickColor.new("Forest Green")
    end
    if y.Parent.Anarchrome == true then --if the player scoops up some of X then...
        y.Liquid_State.Transparency = 0.5
        y.Liquid_State.BrickColor = BrickColor.new("New Yeller")
    end
    if y.Parent.Water == true then --if the player scoops up some of X then...
        y.Liquid_State.Transparency = 0.5
        y.Liquid_State.BrickColor = BrickColor.new("Alder")
    end
    if y.Parent.Empty == true then --if the player scoops up some of X then...
        y.Liquid_State.Transparency = 0
        y.Liquid_State.BrickColor = BrickColor.new("Black")
    end
    if y.Parent.Lemon_Juice == true then --if the player scoops up some of X then...
        y.Liquid_State.Transparency = 0.5
        y.Liquid_State.BrickColor = BrickColor.new("New Yeller")
    end
end

y.Parent.Dyxroid.Value.Changed:connect(ArderRoy)
y.Parent.Anarchrome.Value.Changed:connect(ArderRoy)
y.Parent.Water.Value.Changed:connect(ArderRoy)
y.Parent.Empty.Value.Changed:connect(ArderRoy)
y.Parent.Lemon_Juice.Value.Changed:connect(ArderRoy)

Above changes the current color of the water and the transparency (it's on 1 transparency, so the color doesn't matter when empty)

0
Well I'm not sure if this is right because i ran into this problem. If a script changes a value like Dyxroid.Value = true then the thing that tests which is change does not work so i think you should change the changes into something like keeping on looping the function you have, but with a few changes :P Anthony9960 210 — 9y
0
nvm, fixed the issue. How do I mark this as answered? Cyotokatrov 20 — 9y
0
no need :3 Anthony9960 210 — 9y
0
Thanks for the help. Cyotokatrov 20 — 9y

Answer this question