ImageLabel does not change position on DialogChoiceSelected [?]
Asked by
2 years ago Edited 2 years ago
Hey scripters!
I was doing a script so if a player chooses the wrong DialogChoice he would die and get a SHAKING jumpscare (shaking is the keyword)
Here is the script:
02 | local loleris = script.Parent.Popup:WaitForChild( "ImageLabel" ) |
03 | oldpos = loleris.Position |
04 | dialog.DialogChoiceSelected:connect( function (player, choice) |
06 | if choice = = script.Parent.Else.Else 1. Else 2. Else 3. SkyColor.A.Else 4. OwnerName.C.Fail 8 then |
08 | player.Character.Humanoid.Health = 0 |
10 | local c = script.Parent.Popup:Clone() |
11 | c.Parent = player.PlayerGui |
12 | script.Parent.Scream:play() |
13 | script.Parent.XSCREAM:Play() |
14 | wait(. 7 ) script.Parent.Boom:Play() |
15 | wait(. 1 ) script.Parent.XSCREAM:Stop() |
18 | loleris.Position = oldpos + UDim 2. new( 0 ,math.random(- 10 , 10 ), 0 ,math.random(- 10 , 10 )) |
Everything works fine, the player dies, the jumpscare appears, but it does not change it position
The script runs in a script with ClientRunContext (i dont know how can that be useful)
Also output gives no errors, the prints work fine..
Hope this is solveable, thanks.
UPD.: added print into the "for count", the script runs normally, it prints 20 times as requested, runs without errors