I'm currently making a game where you sit on a chair and you gain points. But I'm having some trouble making this script. How would I make a script that gives you one point, every two seconds sitting on a chair but whenever you die or get off, it stops giving you points, until you get back on?
COMMUNITY QUESTION
How do I make a script that gives points when you sit on a chair?
1 answer
I have an Idea:
local hum = game.Players.LocalPlayer.Character:WaitForChild(“Humanoid“)
local points = game.Players.LocalPlayer.Points <— there your point value
while wait() do
if hum.Sit == true then
points.Value = points.Value +5 <— there your earnings
wait(20) <— How long you have to sit for the coins
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Where would I put the script? In the seat? Or in the workspace?
do it into StarterGui, then it is just for one Person