if not seat:FindFirstChild("Speakers") then return end
Doesn’t work and returns this error
attempt to index nil with 'FindFirstChild'
I’ve also tried
if seat:FindFirstChild("Speakers") and active == true
But it returns the same error
here’s some info if you need any:
“Speakers” is an Object Value (has a Value)
im using the Humanoid.Seated function
my script is located inside a LocalScript (idk if that effects anything)
:FindFirstChild() always works with my other scripts, but this one isnt working
If you need my code to help me, then here it is:
Player.Character.Humanoid.Seated:Connect(function(active, seat)
if not seat:FindFirstChild("Speakers") then return end
if seat:FindFirstChild("Speakers") and active == true--[[ and Player.Character.Humanoid.SeatPart:FindFirstChild("Speakers").Value ~= nil--]] then
Gui.Visible = true
elseif active == false then
Gui.Visible = false
end
end)
I’ve already tried looking on other Dev forums for help but i couldn’t find a fix