![]() Local MainStats = plr:WaitForChild("MainStats") ![]() Local ButtonsFolder = game:GetService("Workspace").Buttonsįor _,Button in ButtonsFolder:GetChildren() do Okay ill explain more the system made by me which i use now requires to do /e dance or go off button and touch it again but im trying to make so you only need to stand on the button for it to give the multipliers heres full script Remember to replace Btn and Base with the actual references to the button and base parts in your game. If the conditions are met, it updates the Cash value and increases the multiplier.ĭude btw Make sure to adjust the wait time ( wait(0.1)) inside the loop according to your desired time for checking the button touch. If the player is touching the button ( touching is true), it checks the db variable to ensure the code only executes once. In this modified script, the touching variable is continuously checked inside a loop. Wait(0.1) - Adjust the wait time to your desired interval Multiplier.Value = Multiplier.Value + MultiAdd.Value * Rebirths.Value Local db = false - Declare and initialize the "db" variable ![]() To address these issues, I modified your script with the solutions I said: local touching = false Make sure you declare and initialize it before using it in the script. ![]() Plus dude your script doesn’t show where the db variable is declared or initialized. You need to place the code inside a loop or an event handler to continuously check the value. As a result, the code will only execute once, and the touching variable will always be false. However, the subsequent code that checks the value of touching is not inside any event handler. The touching variable is being set to true or false based on whether the button is being touched. ![]() However, there are a few issues with the code that need to be addressed. Dude after checking ur script, it seems that you are trying to detect when the player touches the button and update the multiplier if certain conditions are met(I hope I’m right hehehe). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |