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

This script works in testing but not in the real game? Maybe it starts too early?

I know this is a common question, but I'm just wondering if anyone knows an easy way to fix this. This is the script:

local seconds = script.Parent
local prefix = script.Value.Value
script.Parent.Parent.Text = prefix.." "..seconds.Value

for i = 1,seconds.Value do
	wait(1)
	seconds.Value = seconds.Value - 1
	script.Parent.Parent.Text = prefix.." "..seconds.Value
end
	
script.Parent.Parent:TweenPosition(UDim2.new(0.379, 0, -0.3, 0), "Out", "Quad", 1)

It works fine in testing but not in the real game. I'm wondering if it doesn't work because it begins before everything has loaded in?

5 comments

0

Is the game FE?

0

and are you using a localscript or script

0

Have you tried pressing F9 in-game?

0

Yes filtering is enabled

0

It's in a script, not local. and what would pressing f9 do that just opens the output?

3 answers

You need to show me the variables please.

2 comments

0

The first variable is a IntValue, the second variable is the value of a StringValue

0

this should be a comment

Yeah, I kind of need to see the variables, but from what I see, make everything :WaitForChild("Name of child"). That way it will actually find the child. Example

local Seconds = script.Parent.Parent:WaitForChild(" whatever the name of variable")
local prefix1 = script:WaitForChild("Value")
local prefix = prefix1.Value

Based from what I heard, you are using Filtering Enabled you MUST use local scripts in GUI's while using Filtering Enabled. Since Local script are client sided and server scripts are server sided. Filtering Enabled This will help you know what the limits are. Just put it in a local script and you can use Remote Events to make it be able to do changes to the server.

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