How to change things from script to things from ReplicatedStorage

Hello DevForum!

How to change this


On this
obraz_2024-01-11_184050294

thank you for any help

If all the items are stored under those models, I would highly recommend changing it to a folder.
Also, you could just change each item to the place in ReplicatedStorage.

If it is a server-side Script:

local rStorage = game:GetService("ReplicatedStorage")
local mythicalItems = rStorage.Towers.mythicalItems:GetChildren()

If it is a client-side LocalScript:

local rStorage = game:GetService("ReplicatedStorage")
local towers = rStorage:WaitForChild("Towers")
local mythicalItemsModel = towers:WaitForChild("mythicalItems")
task.wait(1)
local mythicalItems = mythicalItemsModel:GetChildren()

Each of these examples will return a table of the Instances under the mythicalItems model in ReplicatedStorage.Towers.

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