Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Results never occurring even if statement is true?

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)

1 comment

0

Is it a server script or a client script? Are you changing the attribute in a server script or a client script?

1 answer

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

2 comments

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

0

Is the name correct? Is this a custom attribute?

This discussion is preserved as it was. New answers, comments, and votes are closed.