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

How to run animation in my script? (I think that's a simple question)

Asked by 2 years ago

I have a script (so that no one comments that I'm begging for scripts) and it works. I need the animation with ID to be played in the place I indicated (see the script at the bottom) . I don't know how to do it, because there are a lot of tutorials on YouTube and everyone looks like otherwise. THE SCRIPT IS NOT A LOCAL SCRIPT. If you need a localplayer then the usual "player" will do.

function Open(player)


    if player.Team == game.Teams.Interpol then
        --ignore this
        local copy = game.ReplicatedStorage.Door:Clone()
        local remain = game.ReplicatedStorage.CopyDoor:Clone()
        game.Workspace["Fbi open up"]:Play()
        --plays the sound,creates copy of the object
        wait(2.011)
        --[here i need the script]
        wait(0.5)
        script.Parent:Destroy()
        remain.Parent = game.Workspace
        remain.Anchored = false
        --makes door fall from upstairs and plays sound
        game.Workspace["Wood Breaking"]:Play()
    end

    end
0
Are you trying to animate a door? You can use tweenservice https://developer.roblox.com/en-us/api-reference/class/TweenService AProgrammR 398 — 2y
0
no KotyOceloty 25 — 2y

Answer this question