for i, v in pairs(ServerStorage:GetChildren()) do
if v:FindFirstChild(input) then
print(v.Name)
print(type(v.Name))
v.Parent = sectors:FindFirstChild(string:gsub(v.Name, "Rooms", ""))
end
end
end)
I’m getting this error despite the print literally saying that its a string???

I’m lost
You need to call the function with .
operator, not :
. Otherwise, it will pass the string library as the first argument as you’re calling it on the string library with :
.
2 Likes
for i, v in pairs(ServerStorage:GetChildren()) do
if v:FindFirstChild(input) then
print(v.Name)
print(type(v.Name))
v.Parent = sectors:FindFirstChild(string.gsub(v.Name, "Rooms", ""))
end
end
end)
Oh i literally didnt see that lol thanks