You can write your topic however you want, but you need to answer these questions:
**What do you want to achieve? : when you sit in a chair in my game a ui pops up with a button you click it and you start to make income and when you click the button again the money stops coming in
What is the issue? :I am very new to scripting and I have no clue where to start
**What solutions have you tried so far?**I looked in plenty of YouTube videos and read topics but could find somewhere to start
I am not asking you guys to write a whole script for me or anything I just need help on where to look in order to start scripting for this, sorry I am very new
Well you could add the GUI and then put a script so that if you are sitting in a chair the GUI pops up, and when you click the button it starts a while true do that adds a certain amount every second or every few seconds and it breaks if you click it again.
-- local script
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
local gui = script:WaitForChild("gui")
humanoid.Seated:Connect(function(isSeated, seat)
if (isSeated) then
gui.Visible = true
end
end)
This provides what you need. Please use the developer hub and attempt to solve this issue on your own. Problem solving is a great skill to learn and prepare you for life outside of this.
Thank you guys for helping I really appreciate all the help I can get I’ll take not of everything thank you all I’m just in the beginning of my journey of becoming a game developer
If you want a specific seat to trigger your function, use Seat.Occupant. This is a property that returns the humanoid of the player sitting in the seat.
Also you should use some remote events because, GUI’s can only be enabled with a local script so put a local script in the GUI so that the GUI pops up when the Remote Event is fired.