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

Making a Game... One Piece I need help, please?

Asked by 10 years ago

while true do wait(10) Chance = math.random(1,10000) if Chance == 382 then print("Yami Fruit Ganae") Gomu = game.Lighting.DevilFruitModels:FindFirstChild"Gomu Gomu":clone() Gomu.Parent = Workspace Gomu.Base.CFrame = script.Parent.CFrame wait() script.Parent:remove() elseif Chance == 4829 then print("Gomu Fruit Ganae") Bari = game.Lighting.DevilFruitModels:FindFirstChild"Bari Bari":clone() Bari.Parent = Workspace Bari.Base.CFrame = script.Parent.CFrame wait() script.Parent:remove() elseif Chance == 3004 then print("Magu Fruit Ganae") Hana = game.Lighting.DevilFruitModels:FindFirstChild"Hana Hana":clone() Hana.Parent = Workspace Hana.Base.CFrame = script.Parent.CFrame wait() script.Parent:remove() elseif Chance ~= 382 and Chance ~= 4829 and Chance ~= 3004 then print("Nope") wait(10) end end

0
you need to add brackets when using FindFirstChild for example the the third line should say game.Lighting.DevilFruitModels:FindFirstChild("Gomu Gomu"):clone() UserOnly20Characters 890 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago
while true do wait(10)
Chance = math.random(1,10000)
if Chance == 382 then
print("Yami Fruit Ganae")
local Gomu = game.Lighting.DevilFruitModels:FindFirstChild("Gomu Gomu"):clone()
Gomu.Parent = workspace
Gomu.Base.CFrame = script.Parent.CFrame
wait()
script.Parent:remove()
elseif Chance == 4829 then print("Gomu Fruit Ganae")
local Bari = game.Lighting.DevilFruitModels:FindFirstChild("Bari Bari"):clone()
Bari.Parent = workspace
Bari.Base.CFrame = script.Parent.CFrame
wait()
script.Parent:remove()
elseif Chance == 3004 then
print("Magu Fruit Ganae")
local Hana = game.Lighting.DevilFruitModels:FindFirstChild("Hana Hana"):clone()
Hana.Parent = workspace
Hana.Base.CFrame = script.Parent.CFrame
wait()
script.Parent:remove()
elseif Chance ~= 382 and Chance ~= 4829 and Chance ~= 3004 then
print("Nope")
wait(10)
end end

Put parentheses around the strings when you are using :FindFirstChild().

Ad

Answer this question