Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

ImageLabel does not change position on DialogChoiceSelected [?]

Asked by 1 year ago
Edited 1 year 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:

dialog = script.Parent
local loleris = script.Parent.Popup:WaitForChild("ImageLabel")
oldpos = loleris.Position
dialog.DialogChoiceSelected:connect(function(player, choice)
    print("cron")--This is getting the service when the choice is selected
    if choice == script.Parent.Else.Else1.Else2.Else3.SkyColor.A.Else4.OwnerName.C.Fail8 then
        wait(1)
        player.Character.Humanoid.Health = 0
        print("d")
        local c = script.Parent.Popup:Clone()
        c.Parent = player.PlayerGui
        script.Parent.Scream:play()
        script.Parent.XSCREAM:Play()
        wait(.7) script.Parent.Boom:Play()
        wait(.1) script.Parent.XSCREAM:Stop()
        print("dasd")
        for count = 1,20 do
            loleris.Position = oldpos + UDim2.new(0,math.random(-10,10),0,math.random(-10,10))
            wait(0.1)
        end
        c:Remove()
        wait(1) 

    end

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

Answer this question