So I have a function in a module script that is supposed to make a planet, but the planet is only generating in server side, So how do i make that it generates in server and client side at the same time?
local module = {
GeneratePlanet = function(size: number, atmospehere: boolean, temp : number, moons: number, type: string)
print("Atmospehere: "..tostring(atmospehere))
local part = Instance.new("Part")
part.Anchored = true
part.Parent = workspace.Object
part.Shape = Enum.PartType.Ball
part.Position = Vector3.new(5000, 200, 0)
part.Size = Vector3.new(size, size, size)
part.Color = Color3.fromRGB(math.random(1,255),math.random(1,255),math.random(1,255))
local materials = Enum.Material:GetEnumItems()
part.Material = materials[math.random(#materials)]
if atmospehere == true then
print("Statement running")
local part2 = part:Clone()
part2.Material = Enum.Material.ForceField
part2.Parent = part
local mesh = Instance.new("SpecialMesh")
mesh.MeshType = Enum.MeshType.Sphere
mesh.Parent = part2
mesh.Scale = Vector3.new(1.1,1.1,1.1)
end
end
}
return module
That is a common problem that is caused by rendering issues, you see if the player isn’t anywhere near a part or simply cant see it roblox won’t render it and you won’t be able to see it on the client. That’s why StreamingEnabled exists, it allows you to turn off that rendering and make those parts / instances visible