Roblox Shrink on Touch Script

make a roblox lua script that when placed in a part will shrink any player that touches it, with a short cooldown

no, shrink the player the way this scrip part does it: local function onPromptTriggered(player) if biomass >= biomassConsumption then local character = player.Character if character then local humanoid = character:FindFirstChild("Humanoid") if humanoid then humanoid.MaxHealth = humanoid.MaxHealth + maxHealthChange humanoid.Health = humanoid.Health + maxHealthChange -- Heal the player by the same amount

			-- Increase the player's size slightly
			local currentScale = character:GetScale()
			character:ScaleTo(currentScale + sizeAlteration)

			biomass = biomass - biomassConsumption
			updateSign()

Google

gemini

Gemini 2.5 Pro

Code editing is temporarily disabled

No file selected