Made this where if you interact this part with proximity prompt, it changes the text above your head saying that you are "Busy or "Working" by math.random and it changes the text color. Then in 5 seconds, it goes back to idle or something that you are not interacting with it. However, it doesn't seem to work. And is there a way to improve this script like if I were to trigger this twice by proximity, does it continue to reset the wait(10) or does it continue to count down? I'm confused. Thanks for the help.
local prox = script.Parent.ProximityPrompt local overhead = script.HeadGui:Clone() game.Players.PlayerAdded:Connect(function(plr) local clone = script.HeadGui:Clone() clone.Parent = game.Workspace:WaitForChild(plr.Name).Head clone.NameText.Text = plr.Name plr.CharacterAdded:Connect(function() local clone = script.Rank:Clone() clone.Parent = game.Workspace:WaitForChild(plr.Name).Head clone.NameText.Text = plr.Name prox.Triggered:Connect(function(plr) local One = "Busy..." local Two = "Working..." clone.ActionText = math.random(One, Two) clone.TextColor3 = Color3.fromRGB(255, 0, 0) wait(10) clone.ActionText = "Idle" clone.TextColor3 = Color3.fromRGB(85, 255, 127) end) end) end)