I am currently working on a project and need a script to change the size and shape of studs.
heres the script I’ve made so far,
script.Parent.Touched:Connect(function(hit) -- what touched it
if hit.Name == ("Part") and
game.Workspace.Part.Shape == "Block" then -- check if it's name matches
game.Workspace.Part.Shape = ("Sphere") -- changes parts shape into a sphere
game.Workspace.Part.Size = x == 1, y == 1, z == 1 -- changes the size to 1,1,1
end
end)
I am a beginner at scripting, so the code itself is not great. Im not sure how to make it so that it only affects the parts that hit it. is there a way I can do this>
Oh yeah I suggest to do some research into CFrames when you want to move parts and such around. The property is alike Position, only that it includes the Orientation and uses a different value called CFrame.