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

Results never occurring even if statement is true?

Asked by 1 year ago
Edited 1 year ago

why is it that even if the attribute is set to true that it won't print Test to the output console or any other event that I want it to do

local tool = script.Parent
local water = workspace.WaterExistBox 

tool.Activated:Connect(function(player)
    if water:GetAttribute("selectedwater") == true then
        print("Test")
    end
end)
0
Is it a server script or a client script? Are you changing the attribute in a server script or a client script? T3_MasterGamer 2189 — 1y

1 answer

Log in to vote
0
Answered by
NykoVania 231 Moderation Voter
1 year ago

Try doing selectedwater.value or print the attribute when it's clicked to see what the script sees it as

0
did this, its showing up as false no matter what, but i can see the attribute switching from true to false in the properties SteakBites 5 — 1y
0
Is the name correct? Is this a custom attribute? NykoVania 231 — 1y
Ad

Answer this question