I got a model inside replicatedstorage with stringvalue OwnerName and i got a gui whenever you click it it clones the model to workspace and it works fine.. but whenever i click the gui to clone again it says that 03:32:26.334 - OwnerName is not a valid member of Model , but i checked the replicatedstorage the model is still there and the OwnerName value.
a = game.ReplicatedStorage.WindTurbine:clone() script.Parent.MouseButton1Click:connect(function() a.OwnerName.Name = script.Parent.Parent.Parent.Parent.Parent.Parent.Name a.Parent = game.Workspace a:MakeJoints() _G.down = true --- these two is for another script _G.target = a end)
I see your issue. You see, you're only actually cloning the model once. Here's your script fixed:
-- Before you had the clone line up here. That only clones it one time. script.Parent.MouseButton1Click:connect(function() a = game.ReplicatedStorage.WindTurbine:clone() -- You need to clone every time the button is pressed. a.OwnerName.Name = script.Parent.Parent.Parent.Parent.Parent.Parent.Name a.Parent = game.Workspace a:MakeJoints() _G.down = true --- these two is for another script _G.target = a end)
Hope I helped :)