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
Using the local script to make a part disappear on client? make sure the local script is parented or any so related to the player; maybe under character or player, this is probably what you want to do:
local Part = game.Workspace.Part while wait(30) do Part.Transparency = 0 Part.CanCollide = true wait(1) Part.Transparency = 1 Part.CanCollide = false end
Parent your script under the Player or Character
Remember: Local means, a Client; by that it means, the changes that will happen by Local Script will only happen on Client and the nothing will change for other users.
if this is not what you meant, and you want to change it for all players, leave it as it is.
Local Script are replicated, (Distributed among players), if a Local Script isnt parented to a player or the Character, (Written by "xXMadonXx " above) it loses its functionality, a Local Script has to be assigned to a Player, so it knows which client these changes will appear on, another fact is If the Client changes (local script is now parented to another player), the Local Script will error, this is because the script migrated to a user it was never assigned to (replicated to).
feel free to ask questions! any doubts, search it up.
This is 1OOYearsWIthZ0MBlE
Cya!