Hello! So, i turned this script
local Part = script.Parent
while true do
wait (0.001)
Part.Transparency = 1
Part.CanCollide = false
wait(30)
Part.Transparency = 0
Part.CanCollide = true
wait (1)
end
into a local script but it doesn't work. I'm not great at scripting and maybe I am doing it in the wrong way, it could also be because i think that it should work like this but it actually does not. Basically i wanna make it so that when a player touches a part it disappears only for him, could anyone help me?
Script that i meant to put:
local part = script.Parent
local debounce = true
part.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChildWichIsA("Humanoid")
if humanoid and debounce == true then
debounce = false
wait(1)
part.Transparency = 1
part.CanCollide = false
wait(1)
part.Transparency = 0
part.CanCollide = true
debounce = true
end
end)
I'm so sorry

3 comments
Thank you so much dude!
I'm so sorry! I actually meant to put another script in the description! I'm so dumb! local part = script.Parent local debounce = true part.Touched:Connect(function(hit) local humanoid = hit.Parent:FindFirstChildWichIsA("Humanoid") if humanoid and debounce == true then debounce = false wait(1) part.Transparency = 1 part.CanCollide = false wait(1) part.Transparency = 0 part.CanCo
Okay, i changed this script and instead of script.Parent i put game.Workspace.Part, i parented it to starterplayerscripts and startercharacterscripts but it doesn't work. I'm 100% sure I am doing something wrong though.