I've been wondering how to add a toggle button for a game I have been making as an option to turn explosions off/on for lag purposes.
Use boolean values For example the code below. It can also be switched around
local boolean = Instance.new("BoolValue", script.Parent) boolean.Name = "WhateverYouWantTheNameToBe" local TextObject = --wherever the object that has a text you want to change if boolean == true then TextObject.Text = "ON" --changes the text if true else if boolean == false then TextObject.Text = "OFF" --changes the text if false end end
Closed as Not Constructive by botw_legend, raid6n, and EzraNehemiah_TF2
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?