Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My script breaks after a certain period of time. What do?

Asked by 9 years ago

Hi. I've scripted an unbevel character script with help of many Redditors, but after a certain ammount of player join (I think that's the problem) the script just breaks. Any solutions?

01--LEFT ARM--
02 
03local function trueWeld(a,b)
04    local weld = Instance.new("ManualWeld", a)
05    weld.Part0 = a
06    weld.Part1 = b
07    weld.C0 = CFrame.new()
08    return weld
09end
10 
11local function dressCharacter(character)
12    character:WaitForChild("Left Arm").Transparency = 1
13    local fakeLeftArm = game.Workspace.Player:WaitForChild("lArm"):Clone()
14    fakeLeftArm.Parent = character
15    trueWeld(character:WaitForChild("Left Arm"),fakeLeftArm)
View all 26 lines...

That's part of my script. It's basically that, copypasted for every part of the player model. Any clue?

0
No need for the conditional on line 21, as the 'CharacterAdded' event ensures the character has been loaded and exists. DigitalVeer 1473 — 9y
0
So I remove that line and it'll be OK? broetchen 0 — 9y
0
DigitalVeer: If the character already happened to exist before the `:connect`, it wouldn't happen. That probably shouldn't happen, but you never know --it makes this more general (e.g., you can use it not just on newly joining players) BlueTaslem 18071 — 9y

Answer this question