Character becoming certain parts when touching a part

i have this script which basically resets the whole player and its effects, (with a particle effect) what i want the script to do is add a part to every part of the player and make the body itself invisible, example: touch it and every body part becomes a circle so now your just a bunch of circles walking.

local Players = game:GetService("Players")
local TPDest = workspace.Washer
local cooldown = false
local cooldowntimer = 15 -- Change this to whatever you want the cooldown to be
local particletimer=2.1
local refreshtimer=1.5
local Particles= workspace.Wash.ParticleEmitter--path for your particles here

script.Parent.Touched:Connect(function(partTouched)
	if partTouched.Parent:FindFirstChild("Humanoid") and not cooldown then
        cooldown = true
		local Character = partTouched.Parent
		local Player = Players:GetPlayerFromCharacter(Character)
Particles.Enabled=true
delay(particletimer,function() Particles.Enabled=false end)
delay(refreshtimer,function()
        Player:LoadCharacter()
Player.Character:WaitForChild("HumanoidRootPart").CFrame = TPDest.CFrame
        if Player.Character:FindFirstChild("ForceField") then Player.Character:FindFirstChild("ForceField"):Destroy() end
end)
        wait(cooldowntimer)
        cooldown = false
	end
end)

So as i understood you want to make a player to bunch of spheres when he/she touches the part?

1 Like

yes. and be able to change it to blocks and triangles too

hmmm lemme see if i can do it for ya

2 Likes

I kinda did that but the problem is character refreshing I mean the script refreshes the character and the circles will be deleted im trying to fix that on the best way for example when i remove player:LoadCharacter the script works fine

EDIT: NEVER MIND I FIXED IT

nono, you can delete the character refreshing :slight_smile:

Make sure that you make the part’s can collide to false!

local Players = game:GetService("Players")
local TPDest = workspace.Washer
local cooldown = false
local cooldowntimer = 15 -- Change this to whatever you want the cooldown to be
local particletimer=2.1
local refreshtimer=1.5
local Particles= workspace.Wash.ParticleEmitter--path for your particles here
local plr = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()


script.Parent.Touched:Connect(function(partTouched)
	if partTouched.Parent:FindFirstChild("Humanoid") and not cooldown then
        cooldown = true
		local Character = partTouched.Parent
		local Player = Players:GetPlayerFromCharacter(Character)
Particles.Enabled=true
delay(particletimer,function() Particles.Enabled=false end)
		delay(refreshtimer,function()
			        Player:LoadCharacter()
			Player.Character:WaitForChild("HumanoidRootPart").CFrame = TPDest.CFrame
			local char = plr.Character or plr.CharacterAdded:Wait()
			wait()
				for i,v in pairs(char:GetChildren()) do
				if v:IsA("MeshPart") or v:IsA("Part") then
					local new = game.ServerStorage.Sph:Clone()-- your part here
					local weld = Instance.new("WeldConstraint", new)
					weld.Part0 = v
					weld.Part1 = new
					new.Parent = v
					new.Position = v.Position
					new.Name = "Circle"
					print("Done")
					end
			
		
			        if Player.Character:FindFirstChild("ForceField") then Player.Character:FindFirstChild("ForceField"):Destroy() end
			
				
			end
end)
        wait(cooldowntimer)
        cooldown = false
	end
end)
1 Like

scale the part if it was too big

1 Like

alright, i also forgot to tell, (sorry!) the particle effect and refresher can be deleted
edit: it also doesnt seem to make me circles.

1 Like

did you tried it? 30 characters

yes. i made it uncollide and tried it, i think its because of the refresher which once again, can be deleted

hmm can you send a video about it ?

im sure it’s not because i tested it alot of times

are you using a local script or a simple one?

a normal script, heres your video:
https://gyazo.com/e0262be197f8b30b1ea8812db8846872

so gimme a minute to update the script

okay, remove the particles and refresher

did you put your part into the serverstorage?

no? (30 characters))))))))))))))

Here Is The Performance & the script

local Players = game:GetService("Players")
local TPDest = workspace.Washer
local cooldown = false
local cooldowntimer = 15 -- Change this to whatever you want the cooldown to be
local particletimer=2.1
local refreshtimer=1.5
local Particles= workspace.Wash.ParticleEmitter--path for your particles here
local plr = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()


script.Parent.Touched:Connect(function(partTouched)
	if partTouched.Parent:FindFirstChild("Humanoid") and not cooldown then
        cooldown = true
		local Character = partTouched.Parent
		local Player = Players:GetPlayerFromCharacter(Character)
Particles.Enabled=true
delay(particletimer,function() Particles.Enabled=false end)
		delay(refreshtimer,function()
			        Player:LoadCharacter()
			Player.Character:WaitForChild("HumanoidRootPart").CFrame = TPDest.CFrame
			local char = plr.Character or plr.CharacterAdded:Wait()
			wait()
				for i,v in pairs(char:GetChildren()) do
				if v:IsA("MeshPart") or v:IsA("Part") then
					local new = game.ServerStorage.Sph:Clone()
					local weld = Instance.new("WeldConstraint", new)
					weld.Part0 = v
					weld.Part1 = new
					new.Parent = v
					new.Position = v.Position
					print("Done")
					end
			        if Player.Character:FindFirstChild("ForceField") then Player.Character:FindFirstChild("ForceField"):Destroy() end
			
				
			end
end)
        wait(cooldowntimer)
        cooldown = false
	end!