So I've been making a placement game where you click on an area and it will place a building. It works on a grid system and so I have string values in each clicker part that correspond to their location on the grid, e.g C1, D5, J9. When a player clicks on the part, the string value within that part will move to another folder in the ReplicatedStorage so that I can compare it with a string value that is within a pre-built building at that location. This allows me to move their selected building to the CFrame of the pre-built building. However, whenever I use the GetChildren() function (or similar like FindFirstChild) on the folder in the ReplicatedStorage, it comes back with an error saying GridPosition is not a valid member of Folder. I can see in the explorer tab that the string value definitely is in the folder. The code below is me trying to compare both StringValues. GridPosition is the name of the string value inside every clicker part, and GridPositioning is the string value inside every pre-built room. What am I missing?
game.Workspace.ClickerEvent.OnServerEvent:Connect(function()
local levels = game.ReplicatedStorage.Exoskeleton:GetChildren()
for i = 1, #levels do
local rooms = levels[i]:GetChildren()
for i = 1, #rooms do
local roomlocation = rooms[i].GridPositioning.Value
wait(4)
if game.ReplicatedStorage.TemporaryClick.GridPosition.Value == roomlocation then
local room = game.ReplicatedStorage.Rooms["Test room"]
local placed = room:Clone()
placed.Parent = game.Workspace.UserPlaced
placed:SetPrimaryPartCFrame(CFrame.new(rooms[i].CFrame))
end
end
end
end)

4 comments
Is the TemporaryClick created in the Client or in the Server?
Correction, is the GridPosition created by the Client or the Server?*
Not quite sure ^^. The GridPosition is a string value in all of the clicker parts, it is moved into the ReplicatedStorage folder via a local script in the StarterGui
Also the click event itself is ran by a RemoteEvent with a script in it that places the objects, if that helps anything.