So I'm making a water bottle filler thingamajig, and here's the code for the water bottle part
plate2.ClickDetector.MouseClick:Connect(function(Player)
if Player.Character.hasflask == true then--This is the issue
print('user has flask')
wait()
local val = Player.Character.flaskcolour
fillingflask.Handle.Color = Color3.new(val)
fount2.ParticleEmitter.Rate = 100
fillingflask.Handle.Transparency = 0
fillingflask.top.Transparency = 0
fillingflask.seal.Transparency = 0
fillingflask.black.Transparency = 0
wait(5)
fount2.ParticleEmitter.Rate = 0
fillingflask.Handle.Transparency = 1
fillingflask.top.Transparency = 1
fillingflask.seal.Transparency = 1
fillingflask.black.Transparency = 1
else
print('else')
end
end)
All my values are in StarterCharacterScripts just in case you're wondering. This all worked before I added the code on line 2.
By the way my output when I click the part is
else

1 comment
Line 2: if player.Character.hasflask.Value == true then \ Line 5: local val = player.Character.flaskcolour.Value