why dose it parent it dose char when i do it a 2 time?
local plr = game.Players.LocalPlayer
local chr = plr.Character
local ref = game.Workspace.Part
local hum = chr:WaitForChild("Humanoid")
local InputService = game:GetService("UserInputService")
InputService.InputBegan:Connect(function(input)
local val = script.Parent.Transfrombodything.OFFORON
-- on
local key = input.KeyCode
if key == Enum.KeyCode.R then
for _,body in pairs(chr:GetChildren()) do
if body:IsA("BasePart") then
body.BrickColor = BrickColor.new("Gold")
body.Material = "Neon"
end
for _,size in pairs(hum:GetChildren())do
if size:IsA("NumberValue") then
size.Value = 5
end
-- "BodyDepthScale" or "BodyWidthScale" or "HeadScale" then
--resize.Value = 7
hum:WaitForChild("BodyDepthScale").Value = 10
hum:WaitForChild("BodyWidthScale").Value = 7.89
hum:WaitForChild("HeadScale").Value = 6
val.Value = "ON"
end
end
end
end)
-----
--off
InputService.InputBegan:Connect(function(input)
local val = script.Parent.Transfrombodything.OFFORON
local plr = game.Players.LocalPlayer
local chr = plr.Character
local hum = chr.Humanoid
local key = input.KeyCode
if key == Enum.KeyCode.E then
if val.Value == "ON" then
for _,size in pairs(hum:GetChildren())do
if size:IsA("NumberValue") then
size:Destroy()
end
end
for _,cl in pairs(script.Parent.Transfrombodything:GetChildren()) do
if cl:IsA("NumberValue") then
cl:Clone()
cl.Parent = hum
end
end
end
end
val = "OFF"
end)