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

Does anyone know about moving with vector and random choosing for blocks?

Asked by 5 years ago

So I'm working for this game that sounds really good, the trouble is, that the scripts are just dying, it doesn't want to work. Help! Script 1

1game.Workspace.Buttonaclicked.OnServerEvent:Connect(function()
2    function abuttonclicked()
3end)

LocalScript 1

01local clickdetector = game.Workspace.EnemyArea.Buttons.ButtonA.ClickDetector
02clickdetector.MouseClick:Connect(function()
03    game.Workspace.Buttonaclicked:FireServer()
04end)
05 
06local clickdetector = game.Workspace.EnemyArea.Buttons.ButtonB.ClickDetector
07clickdetector.MouseClick:Connect(function()
08    game.Workspace.Buttonbclicked:FireServer()
09end)
10 
11local clickdetector = game.Workspace.EnemyArea.Buttons.ButtonC.ClickDetector
12clickdetector.MouseClick:Connect(function()
13    game.Workspace.Buttoncclicked:FireServer()
14end)

Script 2

01function ButtonBClicked()
02    game.Workspace.EnemyArea.FoodsChoice.FoodB.Position = Vector3.new(-10.004, 18.21, 8.405)
03    wait(0.5)
04    game.Workspace.EnemyArea.FoodsChoice.FoodB.Position = Vector3.new(-10.004, 18.21, 10.117)
05    wait(0.5)
06    game.Workspace.EnemyArea.FoodsChoice.FoodB.Position = Vector3.new(-10.004, 18.21, 12)
07    wait(0.5)
08    game.Workspace.EnemyArea.FoodsChoice.FoodB.Position = Vector3.new(-10.004, 18.21, 14)
09    wait(0.5)
10    game.Workspace.EnemyArea.FoodsChoice.FoodB.Position = Vector3.new(-10.004, 18.21, 16)
11    wait(0.5)
12    game.Workspace.EnemyArea.FoodsChoice.FoodB.Position = Vector3.new(-10.004, 18.21, 19)
13    wait(0.5)
14    game.Workspace.EnemyArea.FoodsChoice.FoodB.Position = Vector3.new(-10.004, 18.21, 23)
15    wait(0.5)
View all 69 lines...

I also need to make it to only register for the enemy team not the people running on the conveyor.

(I can do most of it, just the button for moving the block forward and randomly choose to their kill or make the player slower or freeze the player)

Answer this question