Object created on server being streamed out?

When I create a clone of a boat on the server, when I send the BoatClone back to client, client gets nil

-- Make a clone of the boat
local BoatClone = Assets.Boats[BoatName]:Clone()

if type(dock) == "userdata" then -- Dock position
	BoatClone.CFrame = dock + (dock.LookVector * BoatClone.Size.Z)
	BoatClone.BodyGyro.CFrame = dock
BoatClone.Parent = ActiveBoats
BoatClone:SetNetworkOwner(player) -- Set network owner
-- Weld the player to the boat
player.Character.Humanoid.WalkSpeed = 0
local PlayerWeld = Instance.new("Weld")
PlayerWeld.Name = "BoatWeld"
PlayerWeld.Part0 = BoatClone
PlayerWeld.Part1 = player.Character.HumanoidRootPart
PlayerWeld.C0 = BoatClone.CFrame:ToObjectSpace(CFrame.new(BoatClone.PlayerMountingSpot.WorldPosition)) * (BoatClone.CFrame - BoatClone.Position)
PlayerWeld.Parent = player.Character.HumanoidRootPart
self.Client.NewBoat:Fire(player, BoatClone, BoatData) -- Tell client
BoatService.NewBoat:Connect(function(boat, boatData)
	print(boat, boatData)

Pre StreamingEnabled being turned on, boat would print the boat model. The boat spawns in correctly, so it’s not like it doesn’t exist

Try this before the SetNetworkOwner line

Player:RequestStreamAroundAsync | developer.roblox.com

1 Like