Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

me module is a dissapear..? (Solved by meh)

Asked by 5 years ago
Edited 5 years ago

me again. I start my game and the sphere module goes poof. help plzzzzzzzzzzzz. (if you do I can give free admin in my other game, lava tunnel!) here is me code.

my sphere generator code:

01wait(1)
02if not game.Workspace.setup.Value == 1 then
03print("[spheres] sphere created")
04script.Parent.Position = Vector3.new(-55, 14, 15)
05script.Parent.Position = script.Parent.Position + Vector3.new(math.random(75), 0,0)
06script.parent.Transparency = 0
07while true do
08 
09script.Parent.Position = script.Parent.Position + Vector3.new(0,0,1)
10if game.Workspace.reset.Value == 1 then
11script.Parent:Destroy()
12end
13end
14else
15print("[spheres] sphere controller has started")
View all 25 lines...

me floor movin' code

01speed = 1
02wait(6)
03while true do
04 
05 script.Parent.Position = script.Parent.Position + Vector3.new(0, 0, speed)
06 wait(0.4)
07 if game.Workspace.reset.Value == 1 then
08 script.Parent.Position = Vector3.new(-18.5, 2, 75)
09 
10end
11 print("[responding] starting safe floor is responding")
12end

me kill stuff code:

01function onTouch(part)
02    local humanoid = part.Parent:FindFirstChild("Humanoid")
03    if (humanoid ~= nil) then   -- if a humanoid exists, then
04        humanoid.Health = 0 -- damage the humanoid
05        print("[notice] floor has detected a huminoid and killed it.")
06        game.Workspace.reset.Value = 1
07        print("[notice] the floor reset the obby")
08        wait(8)
09        game.Workspace.reset.Value = 0
10        print("[notice] value reset is set to 0, obby has start again.")
11    end
12end
13 
14script.Parent.Touched:connect(onTouch)

and me starterGUI code.

01print("[started] starterGUI script1 has started")
02game.Workspace.setup.Value = 1
03game.Workspace.reset.Value = 0
04script.Parent.TextLabel.TextTransparency = 0
05script.Parent.Parent.Enabled = true
06wait(3)
07script.Parent.TextLabel.TextTransparency = 0.9
08wait(0.2)
09script.Parent.TextLabel.TextTransparency = 0.8
10wait(0.2)
11script.Parent.TextLabel.TextTransparency = 0.7
12wait(0.2)
13script.Parent.TextLabel.TextTransparency = 0.6
14wait(0.2)
15script.Parent.TextLabel.TextTransparency = 0.5
View all 35 lines...

please help!!!!!!!!!!!!!!!!!

0
you are not creating any sphere in the first script Gameplayer365247v2 1055 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

im guessing the first script's parent should be the sphere, here is a code that will work

01wait(1)
02if not game.Workspace.setup.Value == 1 then
03local sphere = Instance.new("Part",game.Workspace)
04sphere.Shape = Enum.PartType.Ball
05print("[spheres] sphere created")
06script.Parent = sphere
07script.Parent.Position = Vector3.new(-55, 14, 15)
08script.Parent.Position = script.Parent.Position + Vector3.new(math.random(75), 0,0)
09script.Parent.Transparency = 0
10while true do
11 
12script.Parent.Position = script.Parent.Position + Vector3.new(0,0,1)
13if game.Workspace.reset.Value == 1 then
14script.Parent:Destroy()
15end
View all 28 lines...
0
it creates the part and makes it into a sphere inside workspace Gameplayer365247v2 1055 — 5y
0
No. The workspace has a folder, that has a module that is called spheres, and a part in there (a sphere) and the first code in it. codingMASTER398 52 — 5y
0
ok Gameplayer365247v2 1055 — 5y
0
its solved now. i looked through my entire games scripts 10 times and there is no reason for it to be dissappearing codingMASTER398 52 — 5y
Ad

Answer this question