So here's my current code, I'm trying to make it happen only once and not again for that certain player but every time I do it either doesn't work or rapidly scales the character up
function onTouched(hit) Character = hit.Parent local ResizeData = ResizeModule.ScaleCharacter(Character,1.7, {ScaleTools = true, ScaleHats = true, ScaleBack = false}) ResizeData.StateChanged.Changed:connect(function(State) if not State then Character.Humanoid.MaxHealth = 500 Character.Humanoid.WalkSpeed = 12 Character.Humanoid.JumpPower = 100 end wait(.1) Character.Humanoid.Health = Character.Humanoid.MaxHealth end) end script.Parent.Touched:connect(onTouched)
local part = script.Parent local debounce = false part.Touched:Connect(function(hit) if debounce then return end Character = hit.Parent local ResizeData = ResizeModule.ScaleCharacter(Character,1.7,){ScaleTools = true, ScaleHats = true, ScaleBack = false}) ResizeData.StateChanged.Changed:connect(function(State) if not State then Character.Humanoid.MaxHealth = 500 Character.Humanoid.WalkSpeed = 12 Character.Humanoid.JumpPower = 100 end wait(.1) Character.Humanoid.Health = Character.Humanoid.MaxHealth end)
try this