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

how to make the part gradually bigger when I click a key ?

I want to write a script when I press a key, the part will appear and enlarge to 1 specific size

1 comment

0

Please help

2 answers

✓ Accepted answer

You can insert a Local Script Into StarterPlayerScripts so when a key is pressed it can enlarge the part

function onKeyPress(inputObject, gameProcessedEvent)
	if not gameProcessedEvent then
    if inputObject.KeyCode == Enum.KeyCode.X  then -- Change X to the key you would like to press
		workspace.Test.Size = Vector3.new(10,10,10) -- Change 10,10,10 to the size you would like and Test to the name of your part
		end
	end
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress)

2 comments

0

thanks

0

No problem!

ok i think this might help you:-

local Part = game.Workspace.Part
local ClickDetector = Part.ClickDetector

ClickDetector.MouseClick:Connect(function()
Part.Size = Part.Size + vector3.new(1,1,1) -- change the length, breadth and height as per your needs 

end)

Hope this helps you!!

2 comments

0

wait i didn't notice that it was a key however it would still help you!!

0

thanks

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