--|| Client
local ClientTween = game:GetService("ReplicatedStorage").RemoteEvents.ClientTween
ClientTween.OnClientEvent:Connect(function(modelName)
for _, model in pairs(workspace.Tycoons["Tycoon [1]"]["Purchased Buildings"]:GetChildren()) do
if model.Name == modelName then
print(model)
if model then
print("Exists.")
if model:IsA("Model") then
print("This is a model")
else
print(typeof(model))
end
print(#model:GetChildren())
for _, parts in pairs(model:GetChildren()) do
print(parts)
parts.Transparency = 0.5
print(parts.Transparency)
end
end
end
end
end)
--|| Server Script
if Animate == true then
print("Line 1588 fired.")
ClientTween:FireAllClients(Pads.Name)
end
I’m trying to reference a model in the workspace in a folder after passing in the name of the model through FireAllClients. In the OnClientEvent, the model name is printed and I’ve made sure that the model exists in the workspace as well as if the model is a model itself. The amount of children in the model however prints out 0 which I don’t understand. What could be causing this? Thank you for any help!