Hello, I’ve been trying to add a day cycle when I noticed this bug was occurring. The script runs fine however it breaks my eyeball. It’s just a simple script that shouldn’t be causing this but it is. Error logs are clean.
local minutesaftermidnight = 0
while true do
game.Lighting:SetMinutesAfterMidnight(minutesaftermidnight)
minutesaftermidnight = minutesaftermidnight + 1
wait(1)
end
As hilarious as this looks, I do need a fix to this. Is there a noticeable mistake in my script I’m not seeing or is this something caused on Roblox’s end?
I’m almost 100% certain this is caused by another script. I copy-pasted your script exactly as-is and didn’t have this issue. Try using ctrl+shift+x in studio and typing “Script” to look for any other scripts causing this.
I just jumped in and out of test mode a few times and it seems to only be happening 25% of the time which is also odd. This hasn’t happened since after I added this script. I also don’t have any other scripts in the game as of rn for them to be causing this issue.
Are you sure you don’t have any other scripts in-game? Do you use any free models or have any admin scripts that could be causing something like this? Even when I wear your exact outfit (via HumanoidDescriptions) and copy that exact code, I don’t have this issue at all.
I don’t use free models. If I do it’s very very rare and I usually don’t keep them for long. I much rather have my own work in my games. I haven’t added a admin script either. I just began working on this project too so there’s not much of anything in this place as of right now. I actually have 1 more script I almost forgot about but it shouldn’t be effecting this either as it just changes the transparency of the topbar and disabled the playerlist UI as I’ll be making my own.
This script definitely isn’t what’s causing the issue, so I’d try using ctrl+shift+x just to make sure there’s nothing else that could be affecting it.
This is caused by another script. I’m not sure what you mean by your eyeball is breaking though since it’s not explicitly explained, but that’s completely unrelated to setting a property of the Lighting service.
The thing is, there isn’t a script in the game that would be causing this. I haven’t added any more scripts as I’m focusing more so on the modeling right now. I provided a image above showing what my eyeball is doing. The mesh is stretching over most of my body when it shouldn’t be.
You don’t know that for certain unless you’ve checked your game and ensured that there are no other scripts causing this issue or plugins that are affecting it. Don’t work off of a hunch, work off of a fact. Search your game for code that might be affecting your character.
Changing a property of the Lighting service is unrelated to a character’s mesh sizes. Have you tried removing the script and play testing in addition to searching your game properly?
These are the only scripts I’ve added so far. I don’t have any installed character or accessory related plugins activated at the moment so I don’t think any of them should be causing this.
Also, the inventory and stats UIs there aren’t programmed at all. The Day cycle and the Disable UI script are the only ones which have been added so far.
I’m just going to assume this may be a Roblox bug then since no one seems to know why this is happening. I’m quite confused on this still. If I disable this script, the bug seems to vanish however when I activate it, it happens about 25% of the time I enter test mode which makes no sense to me. I’m not an advanced programmer but I do know the basics of the Lua language and I know for a fact I don’t have any more scripts in the game other than those 2.
You said you didnt install any character or accessory related plugins, but did you check to see if you had any plugins that could be malicious? I would take the script and put it in an empty baseplate and see if the behavior still occurs. If it does then it could be a plugin (unless you disable all of your plugins and the behavior still happens). If it doesnt then it might be one of your scripts in the game.
Now I can’t seem to get the bug to happen again. I deactivated every plugin I had installed, bug didn’t occur, reactivated them all and still no bug? First tested this in a baseplate then did this in the game and it seems to have fixed it? I’m so confused…
You said that the bug only happens 25% of the time so I wouldnt be surprised if it didnt occur the first couple of times. If you’re 100% certain that you dont have any other scripts (such as in Workspace) and it’s just those that you showed in the picture, and the Disable UI script just disables UI, then it most likely is a plugin that’s interfering with your script. I’d keep the plugins disabled for now and continue to observe and see if the behavior occurs again. If not then it’s probably safe to say that it is one of your plugins.
Install an Injection Detection Plugin and check if any of your plugins injected something malicious into a hidden service. Disabling the plugin won’t necessarily delete any malicious scripts it already added into the game.