i have it on local script here is the code should the script be in the gui because i have it in the part when you click it it works but it wont refresh i dont know
local RefreshTime = script.Parent.Refresh.Value
script.Parent.ClickDetector.MouseClick:Connect(function(player)
local Textlabelforthingy = player.PlayerGui.ScreenGui.TextLabel
Textlabelforthingy.Text = "the part has been clicked"
end)
local function RefreshText()
local Textlabelforthingy = player.PlayerGui.ScreenGui.TextLabel
Textlabelforthingy.Text = "."
end
while true do
wait(RefreshTime)
RefreshText()
end

3 comments
You can't have a clickdetector in a gui
script should be in gui, when you use the clickdetector, fire client to refresh
no theres a part in the workspace