Hi ! i have read this script but i want change the CanCollide for a hiden part.
Exemple: if player have more than 30 minutes played on my server, the part become hiden and the player can go on the other side (only for players have 30 minutes, not all), i don't know if it's possible ?
Code:
local parent = script.Parent
parent.Touched:Connect(function(other_part)
local player = game:GetService("Players"):GetPlayerFromCharacter(other_part.Parent)
if not player then
return
end
local leaderstats = player.leaderstats
local minutes = leaderstats.Minutes
if minutes.Value < 30 then
return
end
parent.CanCollide = false
wait(1)
parent.CanCollide = true
end)

2 comments
thanks but i want delete the part only for user have more than 30 minutes, if i keep the cancollide, some players can walk in the same time and go in the other side ^^
then do it in local script in starter gui, things there happen locally