You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
Make the animation load. -
What is the issue? Include screenshots / videos if possible!
The animation is not loading.
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I looked for solutions on the Developer Hub but none did help.
local EffectType = "non"
local Lighting = game:GetService("Lighting")
local TweenService = game:GetService("TweenService")
local Tool : Tool = script.Parent
local blankScreen = Instance.new("ColorCorrectionEffect")
blankScreen.Name = "BlankScreen"
blankScreen.Parent = Lighting
local animationFolder = Instance.new("Folder")
animationFolder.Name = "Animations"
animationFolder.Parent = script
local ThrowAnimation = Instance.new("Animation")
ThrowAnimation.Name = "Throw"
ThrowAnimation.AnimationId = "rbxassetid://9681380589"
ThrowAnimation.Parent = animationFolder
local function SetEffectType()
if EffectType == "BlankScreen" then
local ti = TweenInfo.new(10)
local Tween = TweenService:Create(blankScreen, ti, {Brightness = 1})
Tween:Play()
script:WaitForChild("Tinnitus"):Play()
task.spawn(function()
Tween.Completed:Connect(function()
TweenService:Create(blankScreen, TweenInfo.new(1), {Brightness = 0}):Play()
script:WaitForChild("Tinnitus"):Stop()
end)
end)
else
warn(EffectType.." is not a effect type.")
end
end
local function PlayAnimation(name, char)
local Humanoid : Humanoid = char:WaitForChild("Humanoid")
if name == "Throw" then
Humanoid:LoadAnimation(ThrowAnimation):Play()
end
end
local function Throw()
PlayAnimation("Throw", Tool.Parent)
end
Tool.Activated:Connect(Throw)