Problem with disappearing local parts!

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want it so that the parts disappear locally to a player.
  2. What is the issue? Include screenshots / videos if possible!
    Right now if you step on the brick it will disappear, but it will also disappear for all players.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried putting it in a dictionary, but that didn’t work.
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

script.Parent.Touched:Connect(function(hit)
	local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	if hit.Parent:FindFirstChild("Humanoid") then
		if not debouncetable[player.Name] then
			debouncetable[player.Name] = true
			wait(0.25)
			script.Parent.Transparency = 0.75
			script.Parent.CanCollide = false
			wait(2.5)
			script.Parent.Transparency = 0.25
			script.Parent.CanCollide = true
			debouncetable[player.Name] = false
		end
	end
end)

Edit: This is a normal script inside the part.

You can do it all from a local script or send a remote event to the player and have them destroy it on their client (from a local script).

change your script to a local script.

The problem is I have multiple disappearing parts. Is there any way to make it easier?

are you trying to make them all disappear at the same time?

did you put the script inside those parts?

No, I am trying to make them disappear once a player touches the part.

Yes I did. The script is in all of the parts.

well then the easiest way would still to put it into a local script and copy/paste the local script into each part.

Ok I will try it. I will get back to you with the results.

So after putting local scripts in each part with the script I had before, it just didn’t do anything. The part didn’t even disappear when touched.

here’s a script that should fully function:

script.Parent.Touched:Connect(function(hit)
if hit.Parent.Name == game.Players.LocalPlayer.Name then
script.Parent.Transparency = 0.75
script.Parent.CanCollide = false
wait(2.5)
script.Parent.Transparency = 0.25
script.parent.CanCollide = true
end
end)

After trying the script and adding a debounce, I still got nothing.

if its disappearing then delete the other scripts from the other partd

Like what do you mean by that?

try it without the debounce and see if it works better if it does, then its your debounce part of the script.

still doesn’t work sadly… any more ideas?

try it without my if statement I added.

Still don’t work. Are you sure you can put local scripts in parts?

yes, you can I have done it before.