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

scripts is not a valid member of "ServerStorage"?

Asked by 3 years ago

I'm trying to copy a script but it won't work....help?

Code:

   local ServerStorage = game:GetService("ServerStorage")
           local CoinScript = ServerStorage.scripts.CoinScript:Clone()
           CoinScript.Parent = script.Parent
               script:Destroy()

1 answer

Log in to vote
0
Answered by 3 years ago

When answering, if your answer does not fully solve the question, it should be written as a comment to the question instead of as an answer.

If my guess is correct you're using a LocalScript, if that's the case ServerStorage can't be accessed through the client due to how FilteringEnabled works, I suggest you use ReplicatedStorage or ReplicatedFirst instead.

0
it works thank you so much! Altbotnot 9 — 3y
Ad

Answer this question