#How do you make a GUI appear when a player sits in a certain chair?
1 messages · Page 1 of 1 (latest)
detect if the player's sitting on the chair
how?
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
or maybe that
he wants the gui to appear if the player sits in a certain chair
not everytime the player sits
local function onSeated(isSeated, seat)
here you get seat instance
so
he can check if this is correct seat
hmm alright
btw volcano11 don't forget to put this in startercharacterscripts
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