Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i size a part using a script?

I am doing a welding script that welds a part to the player if they press a GUI but i don't know the command for sizing the block.

local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()

Mouse.Button1Down:connect(function()
	wait(0.1)
	local Sleeve = Instance.new("Part", workspace)
	 Sleeve.Size = Vector3.new(1.11, 0.92, 1.07) --need help here
	local w = Instance.new("Weld", Sleeve)
	w.Part0 = Player.Character.RightUpperArm
	w.Part1 = Sleeve
	
end)
	

3 comments

0

You've done it correctly. What's the issue?

0

It wasn't showing up for some reason, and now theres a new problem everytime i do the script it automatically welds to the baseplate if i jump.

0

You need to set the C0 and C1 for your weld, so that the game knows how far away the parts need to stay from each other. I suggest you check out http://wiki.roblox.com/index.php?title=Weld as it is explained there.

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.