Everything Inside Model Disappears For No Reason

I am developing for a JoJo game and I am currently working on the summon script which puts the stand to the user’s CFrame and welds, I am having a problem where everything inside the Stand model disappears randomly (Only happens after you take out and put away the stand a lot). This happens with every Stand model. I noticed this when I was testing and I got an error saying “HumanoidRootPart is not a member of (stand model name)” so I checked the model and there was absolutely nothing inside the model, just the model itself.

Here is my code, I reviewed it multiple times and there is nothing that would delete everything inside the model but not the “shell” of the empty model :


local AllStands = {
	["The World"] = game.ReplicatedStorage.Stands["The World"]:Clone(),
	["Star Platinum"] = game.ReplicatedStorage.Stands["Star Platinum"]:Clone(),
	["Fatty The World"] = game.ReplicatedStorage.Stands["Fatty The World"]:Clone(),
	["Nitro Star"] = game.ReplicatedStorage.Stands["Nitro Star"]:Clone(),
	["Null.exe"] = game.ReplicatedStorage.Stands["Null exe"]:Clone(),
	["Killer Queen"] = game.ServerStorage.Stands.KillerQueen:Clone(),
}

local function animate(Anim, animcontrol)
	local anim = animcontrol:LoadAnimation(Anim)
	anim:Play()
end
game.ReplicatedStorage.Summon.OnServerEvent:Connect(function(Player, Stand)
	print("GotServerEvent")
	if table.find(AlreadySummoned, Player.Name) then
		print("FoundPlayerInTable")
		for i,v in pairs(Player.Character:GetChildren()) do
			if v:IsA("Model") then
				v:Remove()
			end
		end

		table.remove(AlreadySummoned, table.find(AlreadySummoned, Player.Name))
		print("DeletedPlayerFromTable")
		print("FinishedOn: StandDisappear")
	else
		print("PlayerNotFoundInTable")
		table.insert(AlreadySummoned, Player.Name)
        
		AllStands[Stand].Parent = Player.Character
		wait(0.5)
		AllStands[Stand]:WaitForChild("HumanoidRootPart").CFrame = Player.Character.HumanoidRootPart.CFrame 
		local animcontrol = AllStands[Stand].AnimationController
		
		local anims = {
			"Idle",
			"NitroIdle",
			"NullIdle"
		}
		
		if Stand == "Nitro Star" then
			animate(script:WaitForChild("NitroIdle"),animcontrol)
		elseif Stand == "Null.exe" then
			animate(script:WaitForChild("NullIdle"),animcontrol)
		else
			animate(script:WaitForChild("SPIdle"),animcontrol)
		end
			
		local weld = Instance.new("Weld", AllStands[Stand].HumanoidRootPart)
		weld.Part0 = Player.Character.HumanoidRootPart
		weld.Part1 = AllStands[Stand].HumanoidRootPart
	
		
		

		
		print("StandSummoned")
		game.ReplicatedStorage.Summon:FireClient(Player)
        print("FinishedOn: StandAwaken")
	end


    
end)
1 Like

check if the models is anchored, or have can colide on

[“the world”].Parent = game.workspace : will put the model in the workspace. try it

I could say something stupid rn but
After putting away the stands make them anchored or place them in some Safe place

The model could just fall and be deleted after some time
Also a little wait() helps to get everything rigt after that millisecond of loading

Alright will try workspace idea, also i made sure they are all unanchored and cancollide off

no turn on can colide and anchored, it’ll fall out if the world

1 Like

Nope, still having the same problem

ok then try this →
local theworld = game.ReplicatedStorage.Stands[“The World”]:Clone()
theworld.Parent = game.workspace
theworld.position = vector3.new(0,3,0)
make a new severscript, and put this code and tell me what happen

To write code in the Devforum, wrap it like this:

1c66bbe99bc65130058be0ef1d50d4b4

It will provide proper syntax highlighting.

2 Likes

I did a bit more testing and found out when i “roka” or remove the string that determines the stand (this also removes the stand model if it is found) the glitch happens more often, also im not sure what you mean by the script you have given me, is that supposed to be when the stand gets unsummoned or when it gets summoned?

cold I see your replecaed storage?

Do you have the model or a script that puts it in somewhere that is not workspace?

If you have it in like ServerScriptService, and your script is supposed to move it to Workspace, make sure the script functions properly.

I just use :Remove() to get rid of it when i unsummon/roka

Would that entirely delete the model while playing?

If so it could be happening to early maybe.

I’m not good in scripting so i’m not sure about this lol.

It would delete the model that is in workspace

why would you clone stands in a table, this is the server after all. If one person has a stand and another person has the same stand it would error. also once you parent the stand it will be gone forever after it’s deleted. it would be easier to clone the stand on summon, for example you can use the stand name to find it in server storage. after finding it you can clone it into the character. you usually shouldn’t use tables for server scripts relating to a local player. if you need anymore help please ask.

Oh, I did not know that, thanks for the help

So you mean instead of cloning it like:

local AllStands = {
	["The World"] = game.ReplicatedStorage.Stands["The World"]:Clone(),
	["Star Platinum"] = game.ReplicatedStorage.Stands["Star Platinum"]:Clone(),
	["Fatty The World"] = game.ReplicatedStorage.Stands["Fatty The World"]:Clone(),
	["Nitro Star"] = game.ReplicatedStorage.Stands["Nitro Star"]:Clone(),
	["Null.exe"] = game.ReplicatedStorage.Stands["Null exe"]:Clone(),
	["Killer Queen"] = game.ServerStorage.Stands.KillerQueen:Clone(),
}

I would clone it like:

local AllStands = {
	["The World"] = game.ReplicatedStorage.Stands["The World"],
	["Star Platinum"] = game.ReplicatedStorage.Stands["Star Platinum"],
	["Fatty The World"] = game.ReplicatedStorage.Stands["Fatty The World"],
	["Nitro Star"] = game.ReplicatedStorage.Stands["Nitro Star"],
	["Null.exe"] = game.ReplicatedStorage.Stands["Null exe"],
	["Killer Queen"] = game.ServerStorage.Stands.KillerQueen,
}

local playerstand = AllStands[Stand]:Clone()

Yep, that’s what I meant. I don’t think a table is necessary for the already summoned thing. you could just clone it to the character then to unsummon you can just do a check in the character to see if there’s a stand model and from there you can delete it.