How to Make a Sit Button

I'll be showing you how to make a sit button, commonly used in RP games.

by rayhansatria

Author Avatar

Why aren't there any pictures?

I'm afraid Roblox's Moderation System would not allow the picture and would possibly terminate my account. I had too many warnings and if Roblox warn my account, they would make me BANNED FOREVER

Good day everybody. Today, I'll be showing you how to make your own sit button! It is commonly used in Roleplay games.

Step 1: Setting up the Button and Events

Insert a ScreenGui into StarterGui so it will get replicated to the player's PlayerGui Insert a TextButton into the ScreenGui Insert a LocalScript inside that TextButton Insert a Script inside ServerScriptService Insert 2 RemoteEvents in ReplicatedStorage, name them "Sit" and "Stand"

Step 2: Coding

Go to the LocalScript inside your TextButton and type this:

local b = false

    if not b then
        game.ReplicatedStorage.Sit:FireServer() -- Firing the Sit RemoteEvent in ReplicatedStorage
        b = true
        game.ReplicatedStorage.Stand:FireServer() -- Firing the Stand RemoteEvent in ReplicatedStorage
        b = false

Go to the Script inside the ServerScriptService and type this:

    local c = player.Character
    c.Humanoid.Sit = true

    local c = player.Character
    c.Humanoid.Sit = false

Step 3: Playtesting

After you write all of that code, you will see that your Sit Button will work!

Thank you for reading this tutorial. -rayhansatria