Shadows flickering upon deleting a model via script

I am not sure if that is the correct support but uh i’ve been experienced some quite weird stuff, everytime i delete a model via scripts, my shadows flicker weirdly and i have no idea how to fix that at all, the only time this has happened to me was when i forgot an humanoid in workspace but i do not have any currently so.

1 Like

Well i was meant to send a file along with the message but everytime i try to send my video it just errors /:

1 Like

Im having the same issue. Do you render your object on the client? (that’s what probably is causing my issue)

1 Like

yeah i render my objects on clients but even if it wasn’t on the client this would still happen prob

1 Like

nope, I tried It on the server and it was fixed. The problem I have is that the objects HAVE to be on the client

1 Like

same here, no idea how to fix that

1 Like

could I ask, why do you need to render object on the client? (In my case its for a TD game to not nuke your PC with 500 models)

1 Like

Same here, tho i found a fix on my side, what was happening on was that i didn’t clamp my alpha value for my bezier curve script from 0 to 1, causing the enemies reaching the end to may end with over a little 1 of alpha making my calculation break and just teleporting them miles away from the center point of my game

1 Like

Ye I had this problem to but it was a very easy fix

1 Like

Wait, did they teleport like 1 millisecond away before you destroyed them?

1 Like

kinda i guess, it’s not really 1 millisecond but ye

1 Like

How did you fix it? Idk on how to do it rly

1 Like

like i said i just clamped my alpha value so it doesn’t go over 1

1 Like

clamp? What do you mean? Is it like a math command or?

1 Like

math.clamp(x, min, max)
basically yes

2 Likes

I tried clamping the alpha value but it didn’t work. Maybe I did something wrong. How did you do it?

1 Like

i just like clamped it idk, for me this fixed it, might be another cause on your side

1 Like

Can you send the the code how you clamped it?

I did this:

math.clamp("calculation for alpha", 0, 1)
1 Like