Hey!
Im making a theme park and need a chain so cirtain ranks can click a chain and it will make it invisible and able to walk through, then after you click it again it goes back to visible and not able to walk through!
I have tried adding a click script and a roup rank script linked up, but it doesent work.
Please can someone help?
If so, could you write the script?
local chain = script.Parent -- Change this to where the chain is
local debounce = false
script.Parent.ClickDetector.MouseClick:Connect(function(plr) -- Make sure you've added a clickdetector
if plr:IsInGroup(Paste Group ID Here) and plr:GetRankInGroup(Paste Group ID Here) > 5--[[the rank in the group]] then
if debounce == false then
debounce = true
chain.CanCollide = false
chain.Transparency = 1
elseif debounce == true then
debounce = false
chain.CanCollide = true
chain.Transparency = 0 -- Or what you set the transparency as beforehand
end
end
end)