local TextLabelSize = workspace.MakingPart.SurfaceGui.TextBox.Text
for _, Child in pairs(workspace.Clikers:GetChildren() ) do
Child.Click.MouseClick:Connect(function()
if Child.Name == "A" then
local ModelingPart = Instance.new("Part", workspace.ModelingPar)
ModelingPart.Size = Vector3.new(1,1,1)
ModelingPart.CFrame = workspace.HarePart.CFrame + Vector3.new(0,1,0)
elseif Child.Name == "B" then
local Whare = workspace.ModelingPar
local Steps Whare:GetChildren()
for _, child in ipairs(workspace.ModelingPar:GetChildren()) do
local NewValue = tonumber(TextLabelSize)
child.Size = Vector3.new(NewValue,NewValue,NewValue)
end
end
end)
end
What solutions have you tried so far? I don’t no where i need fix this, in youtobe have nothing.
Your problem is simply that you save the text of the Textbox in the TextLabelSize variable.
This means that the moment the LocalScript loads in, it saves the text of the Textbox, which would just be “” at the time. Since You try to tonumber the text, which is “”, so you’re just doing tonumber("") which returns nil.
Then you essentially set the part’s size to Vector3.new(nil, nil, nil) which results to the XYZ values being 0.001. This video proves so.
Solution is simple: Get the text of the Textbox in Line 13:
local NewValue = tonumber(TextLabelSize.Text)
and remove “.Text” in the TextLabelSize variable in lline 1:
local TextLabelSize = workspace.MakingPart.SurfaceGui.TextBox
Hello @voozy_v i just doing all what did you say and still Nill and i don’t no why
local TextLabelSize = workspace.MakingPart.SurfaceGui.TextBox
for _, Child in pairs(workspace.Clikers:GetChildren() ) do
Child.Click.MouseClick:Connect(function()
if Child.Name == "A" then
local ModelingPart = Instance.new("Part", workspace.ModelingPar)
ModelingPart.Size = Vector3.new(1,1,1)
ModelingPart.CFrame = workspace.HarePart.CFrame + Vector3.new(0,1,0)
elseif Child.Name == "B" then
local Whare = workspace.ModelingPar
local Steps Whare:GetChildren()
for _, child in ipairs(workspace.ModelingPar:GetChildren()) do
local NewValue = tonumber(TextLabelSize.Text)
print(NewValue)
child.Size = Vector3.new(NewValue,NewValue,NewValue)
end
end
end)
end
I found out that you are changing the text on the client, which does not replicate to the server. You could try switching out the Script with a LocalScript, placed somewhere like StarterPlayerScripts, or use a RemoteEvent.