So I made a cool down system. It runs when "k" is pressed, it works but the GUI dose not change. I looked at the properties of the GUI, the text property changed but not on screen. I added a print statement and it ran. The script is a LocalScript held in StarterCharacterScripts.
local m = game.Players.LocalPlayer:GetMouse() db = true block = true -- This is for blocking the action so you cant use it while it is cooling down. timer = 1 -- This is the timer for the cooldown. It repeats. m.KeyDown:connect(function(k) k = k:lower() if k == "k" then if db == true then if block == true then print("test") block = false wait(timer) game.StarterGui.Test.Frame.TextBox.Text = "test" block = true end end end end)
I needed to use game.Players.LocalPlayer.PlayerGui.Test.Frame.TextBox.Text = "4" Instead of game.StarterGui.Test.Frame.TextBox.Text = "4"