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 4 years ago
Edited 4 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:

wait(1)
if not game.Workspace.setup.Value == 1 then
print("[spheres] sphere created")
script.Parent.Position = Vector3.new(-55, 14, 15)
script.Parent.Position = script.Parent.Position + Vector3.new(math.random(75), 0,0)
script.parent.Transparency = 0
while true do

script.Parent.Position = script.Parent.Position + Vector3.new(0,0,1)
if game.Workspace.reset.Value == 1 then
script.Parent:Destroy()
end
end
else
print("[spheres] sphere controller has started")
script.Parent.Transparency = 1
wait(6)
while true do
if game.Workspace.reset == 0 then
script.Parent:Clone()
wait(1.5)

end
end
end


me floor movin' code


speed = 1 wait(6) while true do script.Parent.Position = script.Parent.Position + Vector3.new(0, 0, speed) wait(0.4) if game.Workspace.reset.Value == 1 then script.Parent.Position = Vector3.new(-18.5, 2, 75) end print("[responding] starting safe floor is responding") end

me kill stuff code:


function onTouch(part) local humanoid = part.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then -- if a humanoid exists, then humanoid.Health = 0 -- damage the humanoid print("[notice] floor has detected a huminoid and killed it.") game.Workspace.reset.Value = 1 print("[notice] the floor reset the obby") wait(8) game.Workspace.reset.Value = 0 print("[notice] value reset is set to 0, obby has start again.") end end script.Parent.Touched:connect(onTouch)

and me starterGUI code.

print("[started] starterGUI script1 has started")
game.Workspace.setup.Value = 1
game.Workspace.reset.Value = 0
script.Parent.TextLabel.TextTransparency = 0
script.Parent.Parent.Enabled = true
wait(3)
script.Parent.TextLabel.TextTransparency = 0.9
wait(0.2)
script.Parent.TextLabel.TextTransparency = 0.8
wait(0.2)
script.Parent.TextLabel.TextTransparency = 0.7
wait(0.2)
script.Parent.TextLabel.TextTransparency = 0.6
wait(0.2)
script.Parent.TextLabel.TextTransparency = 0.5
wait(0.2)
script.Parent.TextLabel.TextTransparency = 0.4
wait(0.2)
script.Parent.TextLabel.TextTransparency = 0.3
wait(0.2)
script.Parent.TextLabel.TextTransparency = 0.2
wait(0.2)
script.Parent.TextLabel.TextTransparency = 0.1
wait(0.2)
script.Parent.Parent.Enabled = false
game.Workspace.setup.Value = 0


local player = game.Players:GetPlayers()

for i = 1, #player do

player[i].Character:MoveTo(Vector3.new(-18.5, 2, 74.5))
end
print("[ended] starterGUI script1 has ended")

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

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

1 answer

Log in to vote
0
Answered by 4 years ago

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

wait(1)
if not game.Workspace.setup.Value == 1 then
local sphere = Instance.new("Part",game.Workspace)
sphere.Shape = Enum.PartType.Ball
print("[spheres] sphere created")
script.Parent = sphere
script.Parent.Position = Vector3.new(-55, 14, 15)
script.Parent.Position = script.Parent.Position + Vector3.new(math.random(75), 0,0)
script.Parent.Transparency = 0
while true do

script.Parent.Position = script.Parent.Position + Vector3.new(0,0,1)
if game.Workspace.reset.Value == 1 then
script.Parent:Destroy()
end
end
else
print("[spheres] sphere controller has started")
script.Parent.Transparency = 1
wait(6)
while true do
if game.Workspace.reset == 0 then
script.Parent:Clone()
wait(1.5)

end
end
end


0
it creates the part and makes it into a sphere inside workspace Gameplayer365247v2 1055 — 4y
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 — 4y
0
ok Gameplayer365247v2 1055 — 4y
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 — 4y
Ad

Answer this question