-
I want my player’s character to play a grab animation like the one in the recent popular roblox game called “infectious smile”
-
When I click my mouse, the animation isn’t running
-
I don’t know how to script animation very well so I have no idea what is the solution
local userInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer:Wait()
local character = player.Character
if not character or not character.Parent then
character = player.CharacterAdded:Wait()
end
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
local function grabHuman(input, gameProcessedEvent)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
print("click")
end
end
userInputService.InputBegan:Connect(grabHuman)
Btw, this character is a character in which the player change to like the roblox game piggy where a player’s character gets changed into a pig.