Roblox Studio Tutorial: How to Create Custom Player Animations
In a LocalScript under StarterPlayerScripts
```
local part = game.Workspace.Part
local click = part.ClickDetector
local Players = game:GetService("Players")
local character = Players.LocalPlayer.Character
if not character then
character = Players.LocalPlayer.CharacterAdded:Wait()
end
local humanoid = character:WaitForChild("Humanoid")
local myAnimation = Instance.new("Animation")
myAnimation.AnimationId = "rbxassetid://04822814884"
local myAnimationTrack = humanoid:LoadAnimation(myAnimation)
local function animate()
myAnimationTrack:Play()
end
click.MouseClick:Connect(animate)
```
'tech > game' 카테고리의 다른 글
21/07/31 How To Play ROBLOX In VR!! (0) | 2021.07.31 |
---|---|
21/07/31 Roblox Studio Tutorial: Doorway (0) | 2021.07.31 |
21/07/31 Roblox Studio Tutorial (How To Change Player Sprint Speed) (0) | 2021.07.31 |
21/07/31 HOW TO MOVE PLAYERS (0) | 2021.07.31 |
21/07/31 Roblox Studio Tutorial: How to Set Up Multiple Spawn Locations (0) | 2021.07.31 |