Help with this script?

I’m trying to customise the current ROBLOX ski tool.

local leftPole = New'Part'
	{
		Name = 'LeftPole';
		FormFactor = 'Custom';
		Size = Vector3.new(0.3, 0.3, 4);
		TopSurface = 'Smooth';
		BottomSurface = 'Smooth';
		CanCollide = false;
		New'SpecialMesh'
		{
			TextureId = GetAssetUrl(POLE_TEXTURE);
			MeshId = GetAssetUrl(POLE_MESH);
			Scale = Vector3.new(3, 3, 3) 
		}
	}

How would I change New’SpecialMesh’ to a Model? Im doing this because I’ve split my meshes into 3 pieces to allow for texturing.

I’m a newbie at Lua Scripting so please provide a simple answer, and the fix for it.

The (path) for this is: Workspace.Skis.ski_pole

Assuming that New is converting arrays into children and key/value pairs into properties, you can make it like so. You’ll have to edit each part’s properties and such as you see fit though (like positions).

local model = New 'Model'
{
	New 'Part'
	{
		Name = 'FirstPart';
		FormFactor = 'Custom';
		Size = Vector3.new(0.3, 0.3, 4);
		TopSurface = 'Smooth';
		BottomSurface = 'Smooth';
		CanCollide = false;
		New'SpecialMesh'
		{
			TextureId = GetAssetUrl(FIRST_TEXTURE);
			MeshId = GetAssetUrl(FIRST_MESH);
		};
	};
	New 'Part'
	{
		Name = 'SecondPart';
		FormFactor = 'Custom';
		Size = Vector3.new(0.3, 0.3, 4);
		TopSurface = 'Smooth';
		BottomSurface = 'Smooth';
		CanCollide = false;
		New'SpecialMesh'
		{
			TextureId = GetAssetUrl(SECOND_TEXTURE);
			MeshId = GetAssetUrl(SECOND_MESH);
		};
	};
	New 'Part'
	{
		Name = 'ThirdPart';
		FormFactor = 'Custom';
		Size = Vector3.new(0.3, 0.3, 4);
		TopSurface = 'Smooth';
		BottomSurface = 'Smooth';
		CanCollide = false;
		New'SpecialMesh'
		{
			TextureId = GetAssetUrl(THIRD_TEXTURE);
			MeshId = GetAssetUrl(THIRD_MESH);
		};
	};
}

Yeah it wasn’t working thanks, ill edit this if its fixed.


Slight issue now, how do i rotate this and make it a appropriate size?

For that, you’ll have to ask a builder! I’m no builder. You need to set the CFrame and change the Scale of the meshes. Or, maybe a weld…

1 Like