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

game.workspace.GameStatus.GameProgress.Changed is not working?

Asked by 3 years ago

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.

0
is this a server script? and what is the script you're changing it from, local or server? megukoo 877 — 3y
0
not a server script, or localscript this is in a model. and i am just modfying postions. and a value CallMe_Axis 63 — 3y
0
Is it a regular script or a local script? MrOinkerzYT 87 — 3y
0
You can't just put text in a model. MrOinkerzYT 87 — 3y
View all comments (3 more)
0
script CallMe_Axis 63 — 3y
0
i am not putting text i a model i am looking for a way. to make the function run! CallMe_Axis 63 — 3y
0
thats all nothing big. CallMe_Axis 63 — 3y

1 answer

Log in to vote
0
Answered by
zane21225 243 Moderation Voter
3 years ago

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)
0
Still Not Working Thanks For The Help Though CallMe_Axis 63 — 3y
Ad

Answer this question