Attribute saying its changed through server script but isnt displaying it serverside

hey all, I’ve got a script to change an attribute, but I dont see it change serverside, but when printing the attribute value, it returns as if its changed, can anyone explain why ? images attached

print output:

image

Attributes after said print output:

image

script.Parent.Triggered:Connect(function()
	if debounce == false then
		script.Parent.Enabled = false
		debounce = true
		if equipment.Parent.Parent:GetAttribute("Powered") == true then
			print("powered")
			equipment:SetAttribute("On", not equipment:GetAttribute("On"))
			on = true
			print("on")
			local att1 = equipment.Parent:GetAttribute("Fusior1")
			local att2 = equipment.Parent:GetAttribute("Fusior2")
			if att1 == false and on == true then
				print(att1)
				att1 = true
				print(att1)
			elseif att1 == true and on == false then
				print("att1 off")
				att1 = false
			elseif att1 == true and on == true then
				print("att2 on")
				att2 = true
			elseif att1 == false and on == false then
				print("att2 off")
				att2 = false
			end
			trap()
		end
		debounce = false
		script.Parent.Enabled = true
	end
end)

Make sure u didnt change through local script, they can’t change values in server, they change values only for u

the script is a server script, so that should rule that out (made that mistake a couple of times)

you’re just changing the variable, not the attribute. don’t change att1 to true, instead set the attribute Fusior1 to true.

1 Like

aah that’s it ! I thought the variable would reference the attribute, thanks a ton !

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.