I have a snippet of code below:
local weld = Instance.new("WeldConstraint")
if game.Workspace:WaitForChild("kindacoolguy4000").HumanoidRootPart.Orientation >= Vector3.new(0,0,0)then
script.Parent.Position = game.Workspace:WaitForChild("kindacoolguy4000").HumanoidRootPart.Position + Vector3.new(0,1,5)
else
script.Parent.Position = game.Workspace:WaitForChild("kindacoolguy4000").HumanoidRootPart.Position + Vector3.new(0,1,-5)
end
script.Parent.Orientation = game.Workspace:WaitForChild("kindacoolguy4000").HumanoidRootPart.Orientation
weld.Part0 = script.Parent
weld.Part1 = game.Workspace:WaitForChild("kindacoolguy4000").HumanoidRootPart
weld.Parent = game.Workspace:WaitForChild("kindacoolguy4000").HumanoidRootPart
and when I run the game I get the following error:
19:46:26.316 - Workspace.Birb.PetPart.Script:2: attempt to compare userdata 19:46:26.317 - Stack Begin 19:46:26.317 - Script 'Workspace.Birb.PetPart.Script', Line 2 19:46:26.318 - Stack End
I am unsure of how I am comparing userdata when both are vector3s (unless they aren't) can anyone explain this please?
