heres the code i dont know why it wont refresh
01 | local RefreshTime = script.Parent.Refresh.Value |
02 |
03 | script.Parent.ClickDetector.MouseClick:Connect( function (player) |
04 | local Textlabelforthingy = player.PlayerGui.ScreenGui.TextLabel |
05 | Textlabelforthingy.Text = "the part has been clicked" |
06 | end ) |
07 |
08 | local function RefreshText() |
09 | local Textlabelforthingy = player.PlayerGui.ScreenGui.TextLabel |
10 | Textlabelforthingy.Text = "." |
11 | end |
12 |
13 | while true do |
14 | wait(RefreshTime) |
15 | RefreshText() |
16 | end |
Use a localscript insteed of a script then this will work.
01 | local player = game.Players.LocalPlayer |
02 | local RefreshTime = script.Parent.Refresh.Value |
03 |
04 | script.Parent.ClickDetector.MouseClick:Connect( function () |
05 | local Textlabelforthingy = player.PlayerGui.ScreenGui.TextLabel |
06 | Textlabelforthingy.Text = "the part has been clicked" |
07 | end ) |
08 |
09 | local function RefreshText() |
10 | local Textlabelforthingy = player.PlayerGui.ScreenGui.TextLabel |
11 | Textlabelforthingy.Text = "." |
12 | end |
13 |
14 | while true do |
15 | wait(RefreshTime) |
16 | RefreshText() |
17 | end |