local groupid = 3897722
game.Players.PlayerAdded:Connect(function(player)
if player:GetRankInGroup(groupid) >= 249 then
script.Parent.CanCollide = false
script.Parent.Parent.card.Value = true
end
end)
Help!
local groupid = 3897722
game.Players.PlayerAdded:Connect(function(player)
if player:GetRankInGroup(groupid) >= 249 then
script.Parent.CanCollide = false
script.Parent.Parent.card.Value = true
end
end)
Help!
Hi there! You changed it to a localscript according to the comments. Local scripts don't work in the workspace. They only work in the Player service, tools with exceptions, and the replicated storage I think. There's an easy fix to your issue.
I have no idea what the hierarchy or name of script.Parent is so for this example, we will use workspace.Part.PartChild. Change it to whatever yours is.
Make sure the script below is a local script.
local groupid = 3897722
game.Players.PlayerAdded:Connect(function(player)
if player:GetRankInGroup(groupid) >= 249 then
workspace.Part.PartChild.CanCollide = false
workspace.Part.card.Value = true
end
end)
Make sure the above script is in the StarterCharacterScripts or the StarterGui.
Good luck!
Accept answer if it helped.
oof just realized that LocalScripts can't change values, fire a remoteevent for that
They can change values, but only locally
This discussion is preserved as it was. New answers, comments, and votes are closed.
5 comments
is this in a localScript?
no
If it's in a serverScript, it will have change the dorr to canCollide false for everybody in the game
now it doesnt let anyone in
please help