Hello, not a very knowledgeable person on animating but I am simply trying to make a Glowstick that once you click, it goes up in the air does a little flip, and comes back down to you in your hand.
With that there are some issues!
One being that my hand seems to go with the Glowstick?
This is how I have it set up
Plugins used: Edit Rig Lite, Roblox Animation, and Tool Grip Editor
I do know that I have rigged it incorrectly, but I am honestly not sure what the issue is, help and information would be much appreciated!
Also that I am also having a scripting issue which this isn’t much the category for but will include. I have a script that Is suppose to execute on click and play my animation, but I am not entirely sure how you would do the tool(Glowstick) flip with that?
Code:
local Player = game.Players.LocalPlayer;
local Character = Player.Character or Player.CharacterAdded:Wait();
local Humanoid = Character:FindFirstChildOfClass('Humanoid');
local Animator = Humanoid:WaitForChild('Animator');
local Tool = script.Parent;
local TossId = "rbxassetid://1234";
local TossAnimation = nil;
local TossTrack = nil;
-- // Functions \\
local function OnEquip()
TossAnimation = Instance.new('Animation');
TossAnimation.Parent = Player.Character;
TossAnimation.AnimationId = TossId;
TossTrack.Priority = Enum.AnimationPriority.Action;
TossTrack = Animator:LoadAnimation(TossAnimation);
end
local function TossGlowstick()
if TossTrack then
TossTrack:Play();
end
end
local function OnUnequip()
if TossTrack then
TossTrack:Stop();
TossTrack:Destroy();
end
if TossAnimation then
TossAnimation:Destroy();
end
end
-- // Events \\
Tool.Equipped:Connect(OnEquip);
Tool.Activated:Connect(TossGlowstick);
Tool.Unequipped:Connect(OnUnequip);