#HELP! How do I fix this error?
1 messages · Page 1 of 1 (latest)
is it possible your animation doesn't match your rig type, it may just have uploaded as a nil? else a code snippit may help
heres the entire script it is located in and the rig it was animated on matches my player rig
lol
local uis = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Character:WaitForChild("Humanoid")
local humanoid = Character:WaitForChild("Humanoid")
local db = false
local ts = game:GetService("TweenService")
local event = game.ReplicatedStorage:WaitForChild("timestop")
local Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid://80093336424722"
local FOVIncrease = 140
local FOVDecrease = 70
local IncreaseFOV = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false)
local DecreaseFOV = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false)
local camera = game.Workspace.Camera
uis.InputBegan:Connect(function(input, typing)
if input.KeyCode == Enum.KeyCode.H and not typing and db == false then
db = true
local Anim = humanoid:LoadAnimation(Animation)
Anim:Play()
task.wait(0.1)
event:FireServer()
task.wait(2)
local Tween = ts:Create(camera, IncreaseFOV, {FieldOfView = FOVIncrease})
Tween:Play()
task.wait(1)
local Tween = ts:Create(camera, DecreaseFOV, {FieldOfView = FOVDecrease})
Tween:Play()
task.wait(55)
db = false
end
end)
i find it funny how only line break is db = false end end)
is there a different error in the output? or is that the only one
i know the code is a bit sloppy but it works fine
thats the only one i fixed all other errors
i made the animation in the game and uploaded it to use it
and its under the same ownership as the game
alright
make sure you are the one who uploaded and published the animation and make sure the animation ID is correct. if the game is owned by a group, instead publish it to the group instead of you.
also, double check your game for viruses because i had this RoSync backdoor on my scripts from a plugin that didnt allow my animations to work, making the same bug.