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

Whats wrong with this :Clone()? [closed]

Asked by 10 years ago

When I used this code:

while true do
    wait()
    if game.Workspace.RainingCubes.Disabled == true then
        thenInstance.new("Message", game.Workspace)
        Message.Text = ("RAINING CUBES!")
        wait(3)
        game.Workspace.Message:Remove()
        for i = 15, (math.random(15,25)
            game.Lighting.Blue.Parent:Clone()
            game.Lighting.Blue.Parent = Workspace
            game.Workspace.Blue.Position = Vector3.new((math.random(1,50), 75,(math.random(1,50))
            end)
        end
    end
end

Line number 9 is underlined. I'm not sure whats wrong.

0
Thank you , a correct question. Teeter11 281 — 10y
0
Such messy script senpai such messy script User#5978 25 — 8y
0
It was a year ago! YellowoTide 1992 — 8y
0
Disappointed. LegitimatlyMe 519 — 8y
View all comments (3 more)
0
HOW IS EVERYONE FINDING THIS YellowoTide 1992 — 8y
0
It's on the 'best' question list. .-. ChemicalHex 979 — 8y
0
Also, wat was wrong with you............. ChemicalHex 979 — 8y

Locked by User#5978, LegitimatlyMe, and Spongocardo

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

3 answers

Log in to vote
3
Answered by
LevelKap 114
10 years ago

well for one, you wrote then twice. You also said for i = 15. I needs intervals such as for i = 1, 15 do. Also you shouldn't use Position, its very buggy and CFrame is much better. Simply change Position to CFrame and make it: Blue.CFrame = CFrame.new()

Also the clone command is used incorrectly. Check your other questions for a revised answer

2
Where do I put the math.random(1,50) on the CFrame? And thanks for the help! YellowoTide 1992 — 10y
0
I'm not really sure what your trying to do..... It looks like rain, but if you lookup math.random in loops on google, you should find what your looking for LevelKap 114 — 10y
Ad
Log in to vote
0
Answered by 9 years ago

Raining tacos is better:

while wait() do
l = Instance.new("Part",Workspace)
game.Debris:AddItem(l, 2)
l.CanCollide = false
t = Instance.new("SpecialMesh", l)
t.Scale = Vector3.new(10, 10, 10)
t.MeshId = "http://www.roblox.com/asset/?id=14846869"
t.TextureId = "http://www.roblox.com/asset/?id=14846834"
l.BottomSurface = "SmoothNoOutlines"
l.TopSurface = "SmoothNoOutlines"
--l.BrickColor = BrickColor.Random() --only if you want raining brick
l.CFrame = game.Workspace.BasePlate.CFrame *CFrame.new(math.random(-200, 200),math.random(-200, 500),math.random(-200, 200))
l.Size = Vector3.new(0, 0 ,0)
end
Log in to vote
-2
Answered by 10 years ago

I think he is missing "do" after the math.random

0
why am I frickin down voted when I said something right alexdogg11 5 — 9y