Attempt to index bool with Changed

local Player = game.Players.LocalPlayer
Buildmode = Player:GetAttribute("Buildmode")
repeat 
	wait(0.1)
	Buildmode = Player:GetAttribute("Buildmode") 
until Buildmode == true

print(Buildmode)
Buildmode.Changed:Connect(function()


local TweenService = game:GetService("TweenService")
local PartProperties = {Size = UDim2.new( 1, 0, 1, 0) }
local TweenInfov = TweenInfo.new(
	1,
	Enum.EasingStyle.Quad,--EasingStyle
	Enum.EasingDirection.InOut,--Easing direction
	0,--times to repeat
	false,--goes in reverse
	0--delay
)

	local Tween = TweenService:Create(script.Parent,TweenInfov,PartProperties)
	Tween:Play()
end)

It always gives me the error despite Buildmode printing out true.

Changed doesn’t work on Booleans, nor does it work on attributes. Use AttributeChanged as @HugeCoolboy2007 mentioned

1 Like

Buildmode is a boolean. You’re looking for this:

1 Like

It says attempt to index boolean with ‘AttributeChanged’

Use it on the Instance, not the value.
Player.AttributeChanged

1 Like


Yay it works!

1 Like