Still have questions? Join our Discord server and get real time help.
0

# if game.Workspace.setup.Value == 1 then is running when value is 0. whats going on?

so. I have made a script to clone spheres. question 1: do the scripts of clones run when created? question 2: if not, how do you make it run? question3: so the script, first when the game runs then a setup part of the script runs, NOT the script I want the clones to have. when the clones are created, sometimes in output I get the message "sphere setup started" and that's the exact opposite of what its supposed to do. whyyyyy? here is me code:

local sphere = script.Parent
local setup = game.Workspace.setup
if setup.Value == 1 then
wait(6)
print("sphere setup started")
sphere.Transparency = 1
while true do
wait(1)
print("creating sphere...")
cloned = sphere:Clone()
cloned.Parent = sphere.Parent
print("creating sphere...")
end
end
if setup.Value == 0 then
sphere.Transparency = 0
print("sphere created")
end


0
Edited 1 year ago

you can disable the cloned script, and have the cloner script enable the cloned script after it has been cloned and everything

i will call the cloned script: "clonedScript" and disable the cloned script

cloner:

local cloned = clonedScript:Clone()
cloned.Parent = *where you want to cloned script to be*
cloned.Disabled = false

0
can you post some code for that? codingMASTER398 52 — 1y
0