Script only works in Roblox Studio and not in normal Roblox Player

Hello there,

I have the issue that when i go into Roblox Player my script just suddenly stops working.
When i go into Roblox Studio, everything works just fine.
So everytime i go into the game in normal Roblox Player, it just doesnt work.

The only thing that it does on both sides, is playing the audio but nothing else works.

local TweenService = game:GetService("TweenService")
local EventAudio = game.SoundService:WaitForChild("EventAudio")


task.wait(5)
EventAudio:Play()

local checkpoints = {
	[0.1] = function()
		for _, descendant in ipairs(game.Workspace:GetDescendants()) do

			if descendant:IsA("Script") and descendant.Name == "RGB" then
				descendant.Disabled = false
				print("Enabled script:", descendant:GetFullName())
			end
		end
		game.Workspace.Jerky_Stage.Folder.Fog.ParticleEmitter.Enabled = true
	end,
	[25.5] = function()
		-- Screen Dissapear Logic
		local Jerky_Screen = TweenService:Create(
			game.Workspace.Jerky_Stage.Folder.Jerky_Screen,
			TweenInfo.new(6, Enum.EasingStyle.Sine, Enum.EasingDirection.Out),
			{Transparency = 1}
		)
		local Jerky_ScreenBack = TweenService:Create(
			game.Workspace.Jerky_Stage.Folder.Jerky_ScreenBack,
			TweenInfo.new(6, Enum.EasingStyle.Sine, Enum.EasingDirection.Out),
			{Transparency = 1}
		)
		local T_Jerky_GlitchedCard = TweenService:Create(
			game.Workspace.Jerky_Stage.Folder.Jerky_Screen.T_Jerky_GlitchedCard,
			TweenInfo.new(6, Enum.EasingStyle.Sine, Enum.EasingDirection.Out),
			{Transparency = 1}
		)
		T_Jerky_GlitchedCard:Play()
		Jerky_Screen:Play()
		Jerky_ScreenBack:Play()
	end,
	[69.3] = function()
		local ColorCorrectionFadeDark = TweenService:Create(
			game.Lighting.ColorCorrection,
			TweenInfo.new(6.7, Enum.EasingStyle.Quint, Enum.EasingDirection.In),
			{Brightness = -0.5}
		)
		ColorCorrectionFadeDark:Play()
		
	end,
	[76.3] = function()
		game.Lighting.ColorCorrection.Brightness = 0

	end,
}


local connection
connection = game:GetService("RunService").Stepped:Connect(function()
	for time, action in pairs(checkpoints) do
		if EventAudio.TimePosition >= time then
			-- Execute the corresponding action
			action()
			checkpoints[time] = nil -- Remove the checkpoint to avoid duplicate triggers
		end
	end

	if next(checkpoints) == nil then
		connection:Disconnect()
	end
end)

Check to see if the time for each checkpoint is actually in the table and check to see if there are any remaining times left in the table

sorry that kinda confuses me …? the script only runs in roblxo studio and not in normal roblox.

Have you checked console logs in the roblox game for errors

if descendant:IsA("Script") and descendant.Name == "RGB" then
	descendant.Disabled = false
	print("Enabled script:", descendant:GetFullName())
end

this can be finnicky in game aswell

make sure your game is published and saved to roblox aswell

If you are using collaborative editing, draft scripts may only be saved locally and not updated on the server. This means that changes made in Studio might not be reflected in the live game

Change the type of script to server

i tried removing those lines compelty, published it and went into roblox player. still no sucesss.
i have collaborative editing but draft scripts turned off.

It is a server script in server script service

change it back to legacy and see normally all my scripts are legacy

1 Like

What do you mean by legacy, i dont get

oh i see now, it was always on legacy, its just a normal script you know?

in a script theres different script types like
image
in the screenshot, change the runcontext of the script

explorer > serverscriptservice > your script > properties > runcontext

i just changed it to server and im gonna see how it goes

1 Like

nice, hope all goes well lmk if it doesnt

yea doesnt work as well, im about to go insane man xd im trying to fix this for 5 hours

are there any errors in output from that script? or runtime errors?

nope… unfortuantly no thats the part whats so confusing

Roblox Player

make print statements for each line of code thats supposed to work and test it so youd find the problem

the print 1 prob didnt run bc it didnt load yet shouldnt be a problem though


stops at 3 :sob:

idk what to say

check workspace properties and your game settings and those things like HTTP requests and enable all those things in that i forgot if its called privacy or what