-
What do you want to achieve? Fix My script.
-
What is the issue? The script is very simple but isn’t working.
-
What solutions have you tried so far? I tried to look at DevHub but i din’t found an solution.
My script:
local kills50fov = game.ReplicatedStorage:WaitForChild("kills50fov")
kills50fov.OnClientEvent:Connect(function()
local tween = game:GetService("TweenService")
local twinfo = TweenInfo.new(22)
local FieldOfView = game.Workspace.Camera.FieldOfView
local tw = tween:Create(FieldOfView , twinfo, {
FieldOfView = 90 --This isn't working
})
tw:Play()
end)
My script is giving the following error: Unable to cast value to Object
Why this is happening?