Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Whats wrong with this :Clone()?

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.

7 comments

0

Thank you , a correct question.

0

Such messy script senpai such messy script

0

It was a year ago!

0

Disappointed.

0

HOW IS EVERYONE FINDING THIS

0

It's on the 'best' question list. .-.

0

Also, wat was wrong with you.............

3 answers

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 comments

2

Where do I put the math.random(1,50) on the CFrame? And thanks for the help!

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

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

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

1 comment

0

why am I frickin down voted when I said something right

This discussion is preserved as it was. New answers, comments, and votes are closed.