Hi I Am Having A Super annoying Problem. that i have been trying to fix for months now. i want to make my script work. and there are no errors in the output. and its in a script this uses a value to lanch a randomizer
game.Workspace.GameStatus.GameProgress.Changed:Connect(function() print("random") script.Parent.B1.Use.Value = UseArray[math.random(1,#UseArray)] script.Parent.B10.Use.Value = UseArray[math.random(1,#UseArray)] script.Parent.B7.Use.Value = UseArray[math.random(1,#UseArray)] script.Parent.B8.Use.Value = UseArray[math.random(1,#UseArray)] script.Parent.B9.Use.Value = UseArray[math.random(1,#UseArray)] script.Parent.B1.Position = b1array[math.random(1,#b1array)] script.Parent.B10.Position = b10array[math.random(1,#b10array)] script.Parent.B7.Position = b7array[math.random(1,#b7array)] script.Parent.B8.Position = b8array[math.random(1,#b8array)] script.Parent.B9.Position = b9array[math.random(1,#b9array)] end)
people have said use Value.Changed but i get errors saying changed is not a vaild meber of parent. so i used GameStatus.GameProgess.Changed and it still does not work
put your suggestions in the comments.
I suggest trying out the GetPropertyChangedSignal instance.
Let me know if the code below works/doesn't work:
local gameProgress = workspace:WaitForChild('GameStatus').GameProgress gameProgress:GetPropertyChangedSignal('Value'):Connect(function() print("random") script.Parent.B1.Use.Value = UseArray[math.random(1,#UseArray)] script.Parent.B10.Use.Value = UseArray[math.random(1,#UseArray)] script.Parent.B7.Use.Value = UseArray[math.random(1,#UseArray)] script.Parent.B8.Use.Value = UseArray[math.random(1,#UseArray)] script.Parent.B9.Use.Value = UseArray[math.random(1,#UseArray)] script.Parent.B1.Position = b1array[math.random(1,#b1array)] script.Parent.B10.Position = b10array[math.random(1,#b10array)] script.Parent.B7.Position = b7array[math.random(1,#b7array)] script.Parent.B8.Position = b8array[math.random(1,#b8array)] script.Parent.B9.Position = b9array[math.random(1,#b9array)] end)