Script can't find decal in ReplicatedStorage folder?

Hi devs,

I have a script that calls a decal from a folder in replicated storage, I don’t know why it’s not working.

Script:

zombieFace = math.random(1, 3)
zombieFace = game.ReplicatedStorage.ZombieFaces["face"..tostring(zombieFace)]
zombieFace.Name = "face"
zombieFace.Parent = zombie.Head

Errormessage:
errormessage

Explorer:
Explorer

Where is the script located?

This text will be blurred

Maybe try waiting for the decal?

zombieFace = game:GetService('ReplicatedStorage'):WaitForChild('ZombieFaces'):WaitForChild('face'..tostring(zombieFace))

Unsure if it’ll fix it but it’d be worth trying.

ServerScriptService
ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ

I’ve tried that, it just gave the infinite waiting warning.

File name and key are different.
Print child’s name to avoid confusion.

Also.
zombieFace = game.ReplicatedStorage.ZombieFaces["face"..tostring(zombieFace)]:clone()

Ah, I was running it 5 times, that explains it, I forgot to clone! :man_facepalming:

1 Like