The script is this:
fout = false
function touched(part)
if fout == false then
local flag = game.ServerStorage.Flag:Clone()
flag.Parent = workspace
workspace.Flag.CanCollide = true
flag.Position = part.Parent.Head.Position + Vector3.new(0,13,0)
flag.Anchored = false
flag.Orientation = part.Parent.Head.Orientation + Vector3.new(0,90,90)
fout = true
local weld = Instance.new('Weld')
weld.Part0 = part.Parent.HumanoidRootPart
weld.C0 = part.Parent.Head.CFrame:inverse()
weld.Part1 = game.Workspace.Flag
weld.C1 = game.Workspace.Flag.CFrame:inverse()
weld.Parent = game.Workspace.Flag
end
end
workspace.FlagGiver.Touched:Connect(touched)
Inside the flag:
function GFlag(part)
workspace.Flag:Destroy()
local NFlag = game.ServerStorage.Flag:Clone()
NFlag.Orientation = part.Parent.Head.Orientation(0,90,90)
NFlag.Position = part.Parent.Head.Position + Vector3(0,13,0)
local weld = Instance.new('Weld')
weld.Part0 = part.Parent.HumanoidRootPart
weld.C0 = part.Parent.Head.CFrame:inverse()
weld.Part1 = game.Workspace.Flag
weld.C1 = game.Workspace.Flag.CFrame:inverse()
weld.Parent = game.Workspace.Flag
end
workspace.Flag.Touched:Connect(GFlag)
The purpose of the first script is to summon a flag above the players head upon touching a brick, the purpose of the second script is to allow anyone who touches the flag to steal it.
The first runs fine, however when touching the second flag it is destroyed then this message appears in the output:
19:58:37.362 - Trying to call method on object of type: Vector3 with incorrect arguments.
19:58:37.362 - Stack Begin
19:58:37.363 - Script 'Workspace.Flag.Script', Line 4
19:58:37.363 - Stack End
I can't work out what I've done wrong, help?

2 comments
My god I feel dumb now, I was for some reason trying to correct line 5, thinking that one was wrong. Thanks! :)
No problem. :D