Server script suddenly yields despite not receiving any changes...?

idk i think what i’m about to send is very self explanatory

image

(StarterPlayer → StarterCharacterScripts → RegenScripts → RegeneratingSystem)


the first 3 lines of code are this (Yes i know inconsistent coding style i wrote this an extremely long time ago)

image

the second line already yields (very visible why)

BUT the problem is, this method has worked before and i haven’t changed ANYTHING that should break it

i need some help with this one it’s crazy

local player = Players:FindFirstChild(char.Name)

this is of course a crutch, but a working one

I see there is a custom starter character so im guessing its due to loading order or something crazy on client.

Something crazy like the initial char loads first then is replaced with a new character?

Idk just brainstorming.

Maybe try to wait until parent of RegenScripts equal to model

repeat task.wait() until (script.Parent.Parent:IsA("Model") == true)
1 Like


image


image

WHAT
THEY RUN OIN THE SAME LOGIC AND ARE IN THE SAME FOLDER???

Idk really, try to print script.Parent.Parent

print(script.Parent.Parent)

it was because the runcontext was server and not legacy

???

I think it’s because StarterPlayer script and StarterCharacter scripts move to player by using clone, so you just got that script that is getting cloned - the og script. In other words, your script was just staying there and it can’t be seen by server, like server can’t see what client script do, and it’s true, just checked it:

print(script.Parent.Parent)

image
And if you change it to client side, becames local script, and changes it’s icon.
image
But og local script can’t change their runcontext.
Every day learing something new :face_with_monocle:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.