So I have this gui that when hovering over a part with a child named ShowText, it will put the ShowText value as the gui, and enable it, basically telling the player what clicking the object does. For my door though, I want it to switch. Which wouldnt be hard, but I have no idea how I would get the player. Should I do a PlayerAdded function in a script thats parent is the String? and it just checks if the player is in the group. I have no clue, any help?
I came up with this script, it does not work though, any help? Its local and should be changing the text depending if im in the group or not, and I did try a group im not in, and it doesnt change.
local Groups = {5173782};
local function isGroupTrue(plr)
for i,v in pairs(Groups) do
if plr:IsInGroup(v) then
return true
end
end
return nil
end
game:GetService("Players").PlayerAdded:Connect(function(plr)
if isGroupTrue(plr) then
script.Parent.Value = "Click to enter Bloxy Lab"
else
script.Parent.Value = "You cannot enter this building"
end
end)
local Groups = {5173782};
local function isGroupTrue(plr)
for i,v in pairs(Groups) do
if plr:IsInGroup(v) then
return true
end
end
return nil
end
game:GetService("Players").PlayerAdded:Connect(function(plr)
if isGroupTrue(plr) ~= nil then
script.Parent.Value = "Click to enter Bloxy Lab"
else
script.Parent.Value = "You cannot enter this building"
end
end)