of     1   

TheBenSquare
#160181661Tuesday, April 14, 2015 11:40 PM GMT

-- i love this script, hopefully the rest of uk does too script.Parent.MouseButton1Click:connect(function(mouse) -- mouse might be the player, idk if script.Parent.Parent.Parent.Parent:findFirstChild("Humanoid") then local plr = game.Players:findFirstChild(script.Parent.Parent.Parent.Parent.Name) if plr:IsInGroup(1190944) and plr:GetRoleInGroup(1190944) >= 130 then -- HM Government+ wait(1) print(" " ..plr.Name.. " is lowering the roadblock.") game.Workspace.RoadBlock.One.One.Transparency = 0.5 game.Workspace.RoadBlock.One.Two.Transparency = 0.5 game.Workspace.RoadBlock.One.One.CanCollide = false game.Workspace.RoadBlock.One.Two.CanCollide = false print("Stage one in lowering the roadblock is complete.") wait(1) game.Workspace.RoadBlock.Two.One.Transparency = 0.5 game.Workspace.RoadBlock.Two.Two.Transparency = 0.5 game.Workspace.RoadBlock.Two.One.CanCollide = false game.Workspace.RoadBlock.Two.Two.CanCollide = false print("Stage two in lowering the roadblock is complete.") wait(1) game.Workspace.RoadBlock.Three.One.Transparency = 0.5 game.Workspace.RoadBlock.Three.Two.Transparency = 0.5 game.Workspace.RoadBlock.Three.One.CanCollide = false game.Workspace.RoadBlock.Three.Two.CanCollide = false print("Stage three in lowering the roadblock is complete.") wait(1) script.Parent.Parent.TextLabel.Text = "ROAD BLOCK STATUS: Offline" print("The roadblock is now offline.") end end end) I meet the requirements to press the button (to make it do something) but when I click either of the buttons, it does nothing. I've checked the server console and there isn't any errors. There isn't any errors on the script itself either. How do I fix this issue?
TheBenSquare
#160187325Wednesday, April 15, 2015 12:55 AM GMT

1
TheBenSquare
#160211665Wednesday, April 15, 2015 11:49 AM GMT

2
Lightlimn
#160212683Wednesday, April 15, 2015 12:32 PM GMT

The player is not in the group, you've got the wrong group ID, wrong rank number, idk also use "workspace" instead of "game.Workspace"
TheBenSquare
#160213319Wednesday, April 15, 2015 12:59 PM GMT

The ID's are correct and changing it to just Workspace won't really make a difference other than removing the word 'game.' I just noticed it should be GetRankInGroup() though, not GetRoleInGroup() so I'll just bump this thread if that doesn't fix it.
Lightlimn
#160213851Wednesday, April 15, 2015 1:25 PM GMT

no, you should use workspace instead of game.Workspace because it's faster to type and faster for the script
TheBenSquare
#160223426Wednesday, April 15, 2015 5:54 PM GMT

Alright, switched it to that but its still the exact same results as before. Here's the updated version. -- i love this script, hopefully the rest of uk does too script.Parent.MouseButton1Click:connect(function(mouse) -- mouse might be the player, idk if script.Parent.Parent.Parent.Parent:findFirstChild("Humanoid") then local plr = game.Players:findFirstChild(script.Parent.Parent.Parent.Parent.Name) if plr:IsInGroup(1190944) and plr:GetRankInGroup(1190944) >= 130 then -- HM Government+ wait(1) print(" " ..plr.Name.. " is lowering the roadblock.") workspace.RoadBlock.One.One.Transparency = 0.5 workspace.RoadBlock.One.Two.Transparency = 0.5 workspace.RoadBlock.One.One.CanCollide = false workspace.RoadBlock.One.Two.CanCollide = false print("Stage one in lowering the roadblock is complete.") wait(1) workspace.RoadBlock.Two.One.Transparency = 0.5 workspace.RoadBlock.Two.Two.Transparency = 0.5 workspace.RoadBlock.Two.One.CanCollide = false workspace.RoadBlock.Two.Two.CanCollide = false print("Stage two in lowering the roadblock is complete.") wait(1) workspace.RoadBlock.Three.One.Transparency = 0.5 workspace.RoadBlock.Three.Two.Transparency = 0.5 workspace.RoadBlock.Three.One.CanCollide = false workspace.RoadBlock.Three.Two.CanCollide = false print("Stage three in lowering the roadblock is complete.") wait(1) script.Parent.Parent.TextLabel.Text = "ROAD BLOCK STATUS: Offline" print("The roadblock is now offline.") else script.Parent.Parent.TextLabel.Text = "ERROR: You are not authorized to perform this action" wait(5) script.Parent.Parent.TextLabel.Text = "ROAD BLOCK STATUS: Offline" end end end)
iMoonMan
#160229787Wednesday, April 15, 2015 8:04 PM GMT

If it's not working, post the error the script gives you when you try to run it, then let us debate the problem.
TheBenSquare
#160231811Wednesday, April 15, 2015 8:36 PM GMT

@torr, That's the problem. There isn't any errors yet it does nothing.
TheBenSquare
#160241083Wednesday, April 15, 2015 10:56 PM GMT

3
Amnesilox
#160241365Wednesday, April 15, 2015 11:00 PM GMT

your script is being a brat and not telling you whats wrong, maybe water board it.
chimmihc
#160242421Wednesday, April 15, 2015 11:14 PM GMT

As for the workspace/game.Workspace issue I will now explain how it works. The reason you can do game when its name is really Game and the reason you can do workspace when its name is really Workspace is something like this. Lua 5.1 doesn't support _ENV yet but I will use it to explain the environment. So every keyword(math,string,function, etc etc) is stored in _ENV, which is a global table holding the environment. local Game = { Workspace = {BasePlate = "BasePlate"}, Players ] {}, Lighting = {}, etc = {}, } print(game.Workspace.BasePlate) -- would error since there is nothing named game. But if you did this: _ENV.game = Game That would work. _ENV.workspace = Game.Workspace And with the way Lua works using workspace over game.Workspace is not faster. I script -~ chimmihc
TheBenSquare
#160291694Thursday, April 16, 2015 8:54 PM GMT

Basically, yeah @amne
TheBenSquare
#160410060Saturday, April 18, 2015 3:53 PM GMT

4
purplescheer9
#160410530Saturday, April 18, 2015 4:00 PM GMT

Does it print everything you tell it to print? If it doesn't then that could probably narrow it down a bit
TheBenSquare
#160411068Saturday, April 18, 2015 4:10 PM GMT

No, it doesn't print anything.
[rfa#hidefromsearch]
#160413645Saturday, April 18, 2015 4:53 PM GMT

[rfa#hidefromsearch]

    of     1