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

How do I make a part that makes you taller on touch?

Hello scripters, I have recently tried to make a script that makes you taller each time you collide with it. I'd like to make it so once you touch it, it disappears so you can't do it again. How do I make this? (Please explain your steps very carefully, I'm not that good at scripting!)

1 comment

0

Hey, next time you make a post, you might wanna show the code you made or attempt to make it because if not, the post will be taken down.

1 answer

Here you go, hope this helps. Ask me questions if you have any! :)

local growPart = script.Parent --Make sure to have this script inside the part and name that part GrowPart

game.Workspace.GrowPart.Touched:Connect(function(hit) --When the part is touched if game.Players:GetPlayerFromCharacter(hit.Parent) then --Checks if the part is being touched by a player and not another part/baseplate etc hit.Parent.Humanoid:WaitForChild("BodyHeightScale").Value = 2 --Changes the height of the player (you can change this to widthscale etc) growPart:Destroy() --Deletes the part once you have stepped on it end end)

// // //

Raw Code:


local growPart = script.Parent 

game.Workspace.GrowPart.Touched:Connect(function(hit) 
	if game.Players:GetPlayerFromCharacter(hit.Parent) then
		hit.Parent.Humanoid:WaitForChild("BodyHeightScale").Value = 2 
		growPart:Destroy() 
	end
end)

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