local customer = game.ReplicatedStorage.Customer customer.Name = "Customer" customer.Parent = script.Parent customer:MoveTo(script.Parent.CustomerSpawner.CFrame + CFrame.new(0,5,0))
Whenever I try this, it says that it expected Vector3 but got CFrame
local customer = game.ReplicatedStorage.Customer customer.Name = "Customer" customer.Parent = script.Parent customer:MoveTo(script.Parent.CustomerSpawner.CFrame + Vector3.new(0,5,0))
Then is said that it couldn't cast Coordinate Frame to Vector3
local customer = game.ReplicatedStorage.Customer customer.Name = "Customer" customer.Parent = script.Parent customer:MoveTo(script.Parent.CustomerSpawner.Position + Vector3(0,5,0))
And this makes the customer spawn on the roof rather than where it's supposed to spawn... Some help please? EDIT: This is a model, not a single Part.
The reason it spawned on the roof with this code:
local customer = game.ReplicatedStorage.Customer customer.Name = "Customer" customer.Parent = script.Parent customer:MoveTo(script.Parent.CustomerSpawner.Position + Vector3(0,5,0))
Is because Vector3 has collision detection where as CFrame does not.
Try using this if you haven't already
local customer = game.ReplicatedStorage.Customer customer.Name = "Customer" customer.Parent = script.Parent customer:SetPrimaryPartCFrame(CFrame.new(0,5,0))
Make sure to set the primary part of the model first though.