Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a gui that pops up when a player sits down that they can click to make them stand up?

Asked by 6 years ago

I have a place where someone made a script for me that makes it where players are unable to jump. I want to add benches with seats for people to sit on but as of now, if a player sits down, they will not be able to stand up since there's already a script that doesn't allow players to jump. I need a script that I can put in a seat part that when you sit, a screen gui pops up that says "Stand Up" and players can click it and it will make them stand up and then the gui goes away. This is the current script so players can't jump:

function connectChar(char)
    char.Humanoid.JumpPower = 0
end

function connectPlayer(player)
    player.CharacterAdded:connect(function(char)
        connectChar(char)
    end)
    if player.Character then
        connectChar(player.Character)
    end
end

game.Players.PlayerAdded:connect(function(player)
    connectPlayer(player)
end)

for _, p in pairs(game.Players:GetChildren()) do
    connectPlayer(p)
end

If I need to add you to a team create, PM me.

Answer this question