local ConeMeshID = 4968089638
local ActualCone = Instance.new("MeshPart")
ActualCone.MeshId = "rbxassetid://"..ConeMeshID
But then, this error Prints in Output
00:58:30.277 Unable to assign property MeshId. Script write access is restricted - Server - Main:32
00:58:30.277 Stack Begin - Studio
00:58:30.277 Script 'Workspace.Model.Main', Line 32 - function giveCone - Studio - Main:32
00:58:30.277 Script 'Workspace.Model.Main', Line 75 - Studio - Main:75
00:58:30.277 Stack End - Studio
The reason for this error is because, as the error says, script write access is restricted. The MeshId property is an fbx file which is downloaded to the computer and then you set the MeshId and stuff. It cannot be written because developers would have to access their player’s files, which is a big security hazard. For this reason, MeshId cannot be written from scripts.
Although as an alternative you can store the mesh somewhere and then clone it whenever you need it.