local UIS = game:GetService(“UserInputService”)
local Character = script.Parent
local Humanoid = Character:WaitForChild(“Humanoid”)
local SizeMultiplier = 0.5
UIS.InputBegan:Connect(function(Key, Chatted)
if Chatted then
return
end
if Key.KeyCode == Enum.KeyCode.Q and Humanoid.HeadScale.Value < 0.5 then
Humanoid.HeadScale.Value *= 0.5
Humanoid.BodyDepthScale.Value *= 0.5
Humanoid.BodyWidthScale.Value *= 0.5
Humanoid.BodyHeightScale.Value *= 0.5
end
local UIS = game:GetService("UserInputService")
local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
local MinSize = 0.5
local MaxSize = 2
local SizeMultiplier = 2
UIS.InputBegan:Connect(function(Key, Chatted)
if Chatted then
return
end
if Humanoid.HeadScale.Value < MaxSize and Key.KeyCode == Enum.KeyCode.E then
Humanoid.HeadScale.Value *= SizeMultiplier
Humanoid.BodyDepthScale.Value *= SizeMultiplier
Humanoid.BodyWidthScale.Value *= SizeMultiplier
Humanoid.BodyHeightScale.Value *= SizeMultiplier
elseif Humanoid.HeadScale.Value > MinSize and Key.KeyCode == Enum.KeyCode.Q then
Humanoid.HeadScale.Value -= 0.5
Humanoid.BodyDepthScale.Value -= 0.5
Humanoid.BodyWidthScale.Value -= 0.5
Humanoid.BodyHeightScale.Value -= 0.5
end
end)
yaaay i figered it out :DDDDDDDDDDDDDDDD
but i made it so that when a player rouches the part it does the job. And other players will see the player becomes bigger
heres wot i did
local part = game.Workspace.Part
local MaxSize = 2
part.Touched:Connect(function(hit)
local Humanoid = hit.Parent:FindFirstChild(“Humanoid”)
if Humanoid.HeadScale.Value < MaxSize and Humanoid then
local HS = Humanoid.HeadScale
local BDS = Humanoid.BodyDepthScale
local BWS = Humanoid.BodyWidthScale
local BHS = Humanoid.BodyHeightScale
Ey, glad you worked it out! Although I would recommend adding a debounce to that script so that you don’t repeatedly increase in size:
local part = game.Workspace.Part
local DB = false
local MaxSize = 2
part.Touched:Connect(function(hit)
local Humanoid = hit.Parent:FindFirstChild(“Humanoid”)
if Humanoid.HeadScale.Value < MaxSize and Humanoid and DB == false then
DB = true
local HS = Humanoid.HeadScale
local BDS = Humanoid.BodyDepthScale
local BWS = Humanoid.BodyWidthScale
local BHS = Humanoid.BodyHeightScale
HS.Value = HS.Value * 2
BDS.Value = BDS.Value * 2
BWS.Value = BWS.Value * 2
BHS.Value = BHS.Value * 2
wait(1)
DB = false
end
end)
i have a grow small block too,
heres the script
local part = game.Workspace.Bruh
local MinSize = 0.5
part.Touched:Connect(function(hit)
local Humanoid = hit.Parent:FindFirstChild(“Humanoid”)
if Humanoid.HeadScale.Value > MinSize and Humanoid then
local HS = Humanoid.HeadScale
local BDS = Humanoid.BodyDepthScale
local BWS = Humanoid.BodyWidthScale
local BHS = Humanoid.BodyHeightScale
You could put it through a loop, slowing increasing your size maybe?
local part = game.Workspace.Part
local DB = false
local MaxSize = 2
part.Touched:Connect(function(hit)
local Humanoid = hit.Parent:FindFirstChild("Humanoid")
if Humanoid.HeadScale.Value < MaxSize and Humanoid and DB == false then
DB = true
local HS = Humanoid.HeadScale
local BDS = Humanoid.BodyDepthScale
local BWS = Humanoid.BodyWidthScale
local BHS = Humanoid.BodyHeightScale
for Loop = 1, 10 do
HS.Value += 0.1
BDS.Value += 0.1
BWS.Value += 0.1
BHS.Value += 0.1
wait(.1)
end
wait(1)
DB = false
end
end)