I’m trying to make a fireball and I keep getting this error
Attempt to call a tweenInfo value
Here is the script
local tweenservice = game:GetService("TweenService")
script.Parent.OnServerEvent:Connect(function(plr)
local Ofireball = game.ReplicatedStorage.OrangeFireball:Clone()
Ofireball.Parent = workspace
game.Debris:AddItem(Ofireball,3)
Ofireball.CFrame = plr.Character.HumanoidRootPart.CFrame + plr.Character.HumanoidRootPart.CFrame.lookVector * 8
tweenservice:Create(Ofireball,TweenInfo.new(1,3,0,0){CFrame = plr.Character.HumanoidRootPart.CFrame +
plr.Character.HumanoidRootPart.CFrame.lookVector * 70,Transparency = 1}, Enum.EasingStyle.Quint,Enum.EasingDirection.Out):Play()
local alreadytouched = false
Ofireball.Touch:Connect(function(hit)
if alreadytouched == true then return end
if hit.Parent.Name == plr.Name then return end
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 35
for i = 1,#hit.Parent:GetChildren() do
if hit.Parent:GetChildren()[i]:IsA("Part") or hit.Parent:GetChildren()[i]:IsA("MeshPart") then
end
end
for i = 1,6 do
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 3
wait(1)
end
end
end)
wait(2.3)
alreadytouched = true
end)