Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to spawn something from replicated storage in a certain position!?

Asked by 3 years ago

Hello

I am trying to make a house spawn in from replicated storage to a designated plot location. I have tried to make the plot the PrimaryPart of the house but that didn't work and i am unsure what to do. This is what i tried but it will not spawn the house into plot1 (the part i would like it to spawn in.)

game.ReplicatedStorage.HouseEvents.SpawnHouse1.OnServerEvent:Connect(function()
    local location = game.ReplicatedStorage.House.House1.PrimaryPart
    local house = game.ReplicatedStorage.House.House1:Clone()
    house.Parent = game.Workspace.Plot1
    house.PrimaryPart = game.Workspace.Plot1

end)

Thanks!

1 answer

Log in to vote
0
Answered by 3 years ago

u kinda forgot to give house.PrimaryPart a parent u need to do: house.PrimaryPart.Parent = game.Workspace.Plot1

0
Thanks! It still doesn't spawn the house on the plot though. MOLFLINT 6 — 3y
0
they add a position property maybe funboy12344444 19 — 3y
Ad

Answer this question