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.
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"
Go to the LocalScript inside your TextButton and type this:
local b = false
script.Parent.MouseButton1Up:Connect(function()
if not b then
game.ReplicatedStorage.Sit:FireServer() -- Firing the Sit RemoteEvent in ReplicatedStorage
b = true
else
game.ReplicatedStorage.Stand:FireServer() -- Firing the Stand RemoteEvent in ReplicatedStorage
b = false
end
end)
Go to the Script inside the ServerScriptService and type this:
game.ReplicatedStorage.Sit.OnServerEvent:Connect(function(player)
local c = player.Character
c.Humanoid.Sit = true
end)
game.ReplicatedStorage.Stand.OnServerEvent:Connect(function(player)
local c = player.Character
c.Humanoid.Sit = false
end)
After you write all of that code, you will see that your Sit Button will work!
Thank you for reading this tutorial. -rayhansatria