Attempt to index boolean with 'Changed'

Hello, so I was scripting something that shouldn’t be that hard at all but for some reason, I got an error? I have no idea why the error is there
"Attempt to index boolean with ‘Changed’ "
Script:

local gunnerseat = script.Parent.Parent.Parent.VehicleSeat.Value
local Loaded = gunnerseat.Parent.Parent.TankEvents.Loaded.Value

Loaded.Changed:Connect(function(valuee)
   if valuee == true then
   	script.Parent.Ready.ImageTransparency = 0
   	script.Parent.Loading.ImageTransparency = 1
   else
   	script.Parent.Ready.ImageTransparency = 1
   	script.Parent.Loading.ImageTransparency = 0
   end
end)

Thank you for your time

2 Likes

You can’t do BoolValue.Value and index it with changed, try and change it to this

local gunnerseat = script.Parent.Parent.Parent.VehicleSeat
local Loaded = gunnerseat.Parent.Parent.TankEvents.Loaded
5 Likes