generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Bool Script not functioning correctly (what the)

Previous Thread :: Next Thread 
theroadrunner is not online. theroadrunner
Joined: 06 Oct 2010
Total Posts: 862
18 Feb 2013 01:40 AM
This is the second time I'm posting this, since I accidentally posted this in the wrong category. :/

Alright, you may have seen my other old post about the AI, and if so, then I got that to work except for the final if statement, where the bricks stay still for 600 seconds. If not, here:

This script is inside a BoolValue called OrderValue. When one chats "Guard here bot.", the value of its parent (OrderValue) will be true for a fraction of a second. Then, it will be false.

Anything wrong here?


while true do
script.Parent.Value = false
wait(.01)
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(
function(msg)
if msg == "Guard here bot." then
if game.Workspace[player.Name].Humanoid ~= nil and ((((game.Workspace.AI.Torso.Position - game.Workspace[player.Name].Torso.Position).magnitude)^2) < 65) then

if player:IsInGroup(131688) then
if player:GetRankInGroup(131688) > 1 then
script.Parent.Value = true
wait(1)
script.Parent.Value = false
end

end
end
end
end)
end)
script.Parent.Value = false

end
Report Abuse
theroadrunner is not online. theroadrunner
Joined: 06 Oct 2010
Total Posts: 862
18 Feb 2013 02:23 AM
bump
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
18 Feb 2013 02:53 AM
No output?

Use ROBLOX's Remote Error Monitoring Script to see output online
Report Abuse
freerunner1234 is not online. freerunner1234
Joined: 23 Nov 2008
Total Posts: 2078
18 Feb 2013 03:18 AM
Well, I only skimmed to be quite honest and noticed an inefficiency. GetRoleInGroup() automatically allows the rank if it is higher than the necessary rank. So I've heard that is, I never actually used it.
Report Abuse
freerunner1234 is not online. freerunner1234
Joined: 23 Nov 2008
Total Posts: 2078
18 Feb 2013 03:19 AM
GetRankInGroup*, Sorry. Tired. Forgot that GetRoleInGroup() returns a string.
Report Abuse
theroadrunner is not online. theroadrunner
Joined: 06 Oct 2010
Total Posts: 862
18 Feb 2013 05:27 AM
Hmn, well, I just changed it a bit, and it's paritally working now.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image