Very, VERY Confusing and Sudden bug

Hello so, I don’t post on Dev Forum much unless I really need to, so

I was just in a team create with another dev, everything was fine, playtesting in studio worked great.. until when i play tested one more time, everything suddenly just doesn’t work, AT ALL

From what I could see, all connections suddenly just refuses to work, the script is running, I did a test by putting a print(“hello”) on the start.. and a print(“hi”) on a renderstepped connection, and it just.. doesn’t print on the renderstepped, at all, no errors, nothing.

The code that i tested, is straight up just

RunService.RenderStepped:Connect(function()
print("hi")
end)

And is, for some reason, not working

Again, the script IS running, it’s just the connections suddenly doesn’t work at all mid editing, and no it’s not a local bug, it happened to the other dev in team create too

I’ve tried changing SignalBehavior but, to no avail

I’m really stuck here, I’m almost certain this is a very sudden or a rare bug of Roblox Studio.. as it has never happened to me in my years of Roblox Studio, this is the first time

2 Likes

As far as i remember renderstepped(render is processing only on client bcause server dont need to render anything) works only on client. If script is server side use heartbeat or something like this.

3 Likes

The script is a local script, as i mentioned, it worked before so it is obviously a local script ..

2 Likes

game["Run Service"].RenderStepped:Connect(function() print("hi") end)

doesnt renderstepped happen like every 1/200th of a second or something crazy like that

it probably overloaded something internally lol

Can you provide the full code snippet, remove any sensitive parts but everything helps debugging.
Does it work inside of the roblox client itself? studio has a few more issues cause its a bit different from what I know.

1 Like

you must have something causing this to not run. do you have an if statement before this code, or some sort of loop?

I doubt it’s my code, I’ve placed a print() statement one line above and outside the renderstepped, it printed, and then emptied the renderstepped and placed another print statement inside that renderstepped, nothing happens.. and no I didn’t disconnect any of the connections with scripts

So if this doesn’t confirm that somehow renderstepped/connections just refuses to work no matter what’s inside, I don’t know what to do

There’s zero loops besides renderstepped, if I did want to make a while true do or for loop, my muscle memory will put it inside a coroutine wrap, so it’s not it

Not possible since I’m running the playtest at 60 FPS, and in the whole game is only two renderstepped running

game:GetService("RunService").RenderStepped:Connect(function()
    print("hi")
end)

I really don’t like that way myself.

local rs = game:GetService("RunService")
rs.RenderStepped:Connect(function()
    print("hi")
end)

Way better in my opinion. Unless I can find a way to avoid do this at all.

yea that’s how I do it in my main code, in the testing code I just did game:GetService(), but overall it shouldn’t matter as both showed the same result

You could try a few other methods to try and narrow it down.

local runService = game:GetService("RunService")

function onRenderStepped()
	print("Connected")
end
function onBindedStep()
	print("Binded")
end

-- Basic connection
print("Connecting RenderStepped")
local connection = runService.RenderStepped:Connect(onRenderStepped)

-- Another way of triggering a function just to see what happens
print("Binding RenderStep")
runService:BindToRenderStep("BindedStep", Enum.RenderPriority.First.Value, onBindedStep)

-- If this loop stops printing, theres an issue with the script running
while runService.RenderStepped:Wait() do
	-- If this ever prints false, the connection was unexpectedly closed
	print("Connected?", connection.Connected)
end

Have you tried restarting Roblox Studio or reinstalling it? If it doesn’nt work, I suggest creating another save file and another save instance.