|
| 16 May 2015 09:13 PM |
It counts down and then a gui comes down and an alarm goes off. On a real server, it counts down but the gui and sounds don't appear after it's done counting. Help?
local v = game.Workspace.Display.SurfaceGui.Time.TextBox function onClicked() local timeremaining = script.Parent.Parent.Time.Text local time = timeremaining for i = 0, time do local minutes = math.floor(time/60) local seconds = math.floor(time%60) local seconds2 = math.floor(time%10) wait(1) time = time - 1 v.Text = "Timer: "..tostring((minutes..":"..(seconds > 9 and seconds or "0"..seconds2))) end v.Text = "" local player = script.Parent.Parent.Parent.Parent.Parent player.PlayerGui.TimerOver.Frame.Visible = true player.PlayerGui.TimerOver.Ring:Play() player.PlayerGui.TimerOver.Frame:TweenPosition(UDim2.new(0.417, 0, 0.05, 0), "InOut", "Quad", 1, false, nil) wait(3) player.PlayerGui.TimerOver.Frame:TweenPosition(UDim2.new(0.417, 0, -0.5, 0), "InOut", "Quad", 1, false, nil) wait(1) player.PlayerGui.TimerOver.Frame.Visible = false end script.Parent.MouseButton1Down:connect(onClicked) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
025110
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 57661 |
|
|
| 16 May 2015 09:32 PM |
'local player = script.Parent.Parent.Parent.Parent.Parent' o my |
|
|
| Report Abuse |
|
|
|
| 16 May 2015 09:34 PM |
I tried using a localscript, that didn't work i changed it to local players = game.Players.LocalPlayer it still works in test servers though.. |
|
|
| Report Abuse |
|
|
| |
|
|
| 16 May 2015 09:48 PM |
| Maybe try to add it in as a startergui? It wouldn't pop-up at the sametime but every player will get one. |
|
|
| Report Abuse |
|
|
|
| 16 May 2015 09:48 PM |
@Battle - I only want the person that clicks it to get the notification. However, every player would be fine too I guess. |
|
|
| Report Abuse |
|
|
| |
|