#How do you make a GUI appear when a player sits in a certain chair?

1 messages · Page 1 of 1 (latest)

lyric scaffold
#

The chair is named GMChair, and there is a ScreenGui called ComputerGui

tacit blade
#

detect if the player's sitting on the chair

lyric scaffold
tacit blade
#

a seatweld

simple cliff
#
local humanoid = character:WaitForChild("Humanoid")

local function onSeated(isSeated, seat)
    if isSeated then
        print("I'm now sitting on: " .. seat.Name .. "!")
    else
        print("I'm not sitting on anything")
    end
end

humanoid.Seated:Connect(onSeated)```
#

try this

tacit blade
#

or maybe that

tacit blade
#

not everytime the player sits

simple cliff
#

local function onSeated(isSeated, seat)

#

here you get seat instance

#

so

#

he can check if this is correct seat

tacit blade
#

hmm alright

tacit blade
karmic blaze
# lyric scaffold how?

Also if you want multiple chairs to do this you should add an attribute or tag (idk which one is more performant but their functionality will be the same) and then you can check that instead of checking if it’s the correct instance