Hi I am wanting to remove some of the Gui when a player sits on a seat. There are no errors with the code. The code doesn't work either. JobChange is the Gui I am wanting to disable when the player sits in seat and re enable it when they aren't sitting in seat. Script:
local seat = script.Parent
local PreviousHumanoid = nil
local function Sat()
local Humanoid = seat.Occupant
if (Humanoid ~= nil) then
PreviousHumanoid = Humanoid
script.Parent.Parent.Parent.Parent.Parent.StarterGui.JobChange.Enabled = false
end
end
if (PreviousHumanoid.Parent == nil) then
return
end
Humanoid = PreviousHumanoid
script.Parent.Parent.Parent.Parent.Parent.StarterGui.JobChange.Enabled = true

1 comment
It works Thank you so much!!