Gui doesnt appear before tweening?
Asked by
5 years ago Edited 5 years ago
01 | game.Workspace.alarm.Touched:Connect( function (touch) |
03 | local gui = game.StarterGui.PoliceNoti |
04 | local alarmevent = game.ReplicatedStorage.AlarmEvent |
05 | if touch.Parent:FindFirstChild( "Humanoid" ) and game.Workspace.alarmsound.IsPlaying = = false then |
06 | game.Workspace.alarmsound:Play() |
07 | alarmevent:FireAllClients() |
12 | game.Workspace.alarmsound.Volume = 0 |
i also have a 2 second wait built into the local script in the gui which reads as such
1 | local text = script.Parent.TextLabel |
2 | local alarmevent = game.ReplicatedStorage.AlarmEvent |
3 | alarmevent.OnClientEvent:Connect( function () |
5 | text.AnchorPoint = Vector 2. new(- 1 , 0 ) |
6 | text:TweenPosition(UDim 2. new(- 0 , 5 , 0 , 0 , 0 ), nil , nil , 5 ) |
have tried multiple things but it hasnt worked. Everything other than the gui appearing works. No errors in the console nothing, it just refuses to appear