#What is wrong with my scriptttttt

1 messages · Page 1 of 1 (latest)

split carbon
#

so i created a simple script that when you choose "DanceChoice" in a dialogue you dance. But the event isnt firing, i added a debug to see if the script can find the choices, it found them so the problem is with the firing.

here is the code : https://pastebin.com/ryr6ciqu

ivory rootBOT
#

studio** You are now Level 2! **studio

thick remnant
# split carbon so i created a simple script that when you choose "DanceChoice" in a dialogue yo...

hi, add some prints to help debug

local dialog = script.Parent

dialog.DialogChoiceSelected:Connect(function(player, dialogChoice)
    print("args",player, dialogChoice)
    if dialogChoice.Name == "DanceChoice" then
        print("line 6 passed (dia' choice)")
        local character = player.Character or player.CharacterAdded:Wait()
        if character then
            print(character)
            local humanoid = character:FindFirstChildWhichIsA("Humanoid")
            if humanoid then
                local animator = humanoid:FindFirstChildWhichIsA("Animator")
                print("line 13 passed (animator)")
                if animator then
                    local danceAnimation = Instance.new("Animation")
                    danceAnimation.AnimationId = "rbxassetid://77896353665529"
                    local animationTrack = animator:LoadAnimation(danceAnimation)
                    animationTrack:Play()
                end
            end
        end
    end
end)

test it and check output for the prints :D

split carbon
#

ima check it rn tysm ',:)

#

k so nothing is kinda showing up in the output

thick remnant
#

no prints at all?

split carbon
#

nope

thick remnant
#

well then the script isn't running then :'))

split carbon
#

ima just see what i can do

#

play with teh script a little

thick remnant
#

maybe try something like the example given on docs

#

basically built the same