Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 2 years ago

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!)

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. Dexiber 272 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

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)
Ad

Answer this question