How do I replace the player's spawn forcefield with a particle emitter?

What the title says. I have this


and I want it to be the player’s forcefield when they spawn/respawn in the game, rather than the classic one that hasn’t been updated in a long time. All tutorials I find are about the Forcefield material on a part and how to add effects to them even though I keep searching for this type of Forcefield.

1 Like

I may be entirely wrong here so please correct me if someone knows otherwise, however when I was creating my mod pack for Roblox textures, I believe I saw the FF being held within there.

In short this would mean its not possible to be changed as simply as something like a texture or decal since the original file is only client sided within the users files.

Again, I’m possibly wrong but its my best guess.

2 Likes

I believe it is an engine limitation as you said. You can go into the current client files and manually change them, but I believe there isn’t a way as well. (Coming from someone who has been heavily customizing serverside components recently.) If anyone does know, it would be helpful.

1 Like

I’m sure it’s possible to change it since I’ve seen people do it before. I even saw someone making a free model for it. But according to the free model’s name, it’s “OUTDATED” and the model is offsale now so I have no way to check it’s code anymore

1 Like

I think the best option for this would be a custom spawning function with its own force field feature since like @a_eschylus said, this would be down to limitations.

Could you link me this model, I’m kinda interested now to take a look.

2 Likes

Here Custom ForceField - Roblox and I made a CUSTOM ForceField

2 Likes

Well, this is an idea as you can’t really change it…

You can just make the particle surround the player who is in need of the forcefield, once then you clone it for the body and give them a lot of health in order to not be killed.

1 Like

A quick browse on google showed this devforum result. It looks to be that yes, a custom spawning one without welding parts and scripting is a limitation of the engine, but you can create custom ones by welding a part in the user.

Taking it with a grain of salt, I don’t script but I have a relative knowledge of the modern roblox engine.

1 Like

I checked that out but I kind of got stuck at the weld part; I’m not very good with welds and I’m even worse managing them through scripts

2 Likes

I’ve made two scripts, One that replaces the Roblox ForceField with a custom one (You may need to edit it a bit to work with your particles), and one that checks if there is a ForceField before damaging the player.

Change ForceField:

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		Character:WaitForChild("ForceField"):Destroy()
		local Particle = nil -- Your Particles
		Particle.Parent = Character.PrimaryPart
		game.Debris:AddItem(Particle, 10) -- ForceField Duration
		Particle.Name = "ForceField"
	end)
end)

Damage Player:

function DamagePlayer(Player, Damage)
	local Character = Player.Character
	if Character ~= nil and Character.PrimaryPart:FindFirstChild("ForceField") == nil then -- Checks for ForceField
		Character.Humanoid.Health = Character.Humanoid.Health - Damage -- Damages player
	end
end
2 Likes

Old post, I know, but this is the way to do it:

What you can do is set the ForceField’s Visible propertey to false. This will keep the forcefield from being seen, while still preventing the Humanoid from taking damage or getting de-welded. Then, in a custom function, insert the particle forcefield into the HumanoidRootPart.

The final code would look something like this:

local CustomForceField = game:GetService("ReplicatedStorage"):WaitForChild("CustomForceField")

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		Character:WaitForChild("spawnForceField").Visible = false
        local ClonedForceField = CustomForceField:Clone()
		ClonedForceField.Parent = Character.PrimaryPart
		game.Debris:AddItem(ClonedForceField, 10) -- ForceField Duration
		ClonedForceField.Name = "customForceField"
	end)
end)