I am trying to make a fireball, and I am following along someones tutorial online. It was made in 2016 so I thought that it would work ok. I am getting this error
17:46:18.068 - Workspace.FiredEvent:12: bad argument #3 to 'Parent' (Object expected, got CFrame)
Here is my stuff that I copied,
game.Workspace.Fired.OnServerEvent:connect(function(Player) local yum = Player local fireball = Instance.new("Part") fireball.Name = "Fireball" fireball.Size = Vector3.new(1.04, 1.04, 1.04) fireball.Transparency = 0 fireball.CanCollide = false local fire = Instance.new("Fire") fire.Parent = fireball fireball.Parent = yum.Character.HumanoidRootPart.CFrame*CFrame.new(0,1,-6) end)
And I am calling it from a local script inside a tool, here is local script,
local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() local RemoteEvent = game.Workspace.Fired script.Parent.Activated:connect(function() RemoteEvent:FireServer(Player) end)
you do
fireball.Parent = yum.Character.HumanoidRootPart.CFrame*CFrame.new(0,1,-6)
probably misstyped that somehow.
game.Workspace.Fired.OnServerEvent:connect(function(Player) local yum = Player local fireball = Instance.new("Part") fireball.Name = "Fireball" fireball.Size = Vector3.new(1.04, 1.04, 1.04) fireball.Transparency = 0 fireball.CanCollide = false local fire = Instance.new("Fire") fire.Parent = fireball fireball.Parent = yum.Character fireball.CFrame= yum.Character.HumanoidRootPart.CFrame*CFrame.new(0,1,-6) end)