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 » Scripters
Home Search
 

Re: Orb script commands not working(fix please)

Previous Thread :: Next Thread 
Haxer4321 is not online. Haxer4321
Joined: 04 Jul 2012
Total Posts: 11
08 Mar 2015 08:21 PM
local part = Instance.new("Part",workspace)
part.Shape = "Cylinder"
part.Size = Vector3.new(1,1,1)
part.TopSurface = "Smooth"
part.BottomSurface = "Smooth"
local bpos = Instance.new("BodyPosition",part)
bpos.maxForce = Vector3.new(math.huge,math.huge,math.huge)
local name = "Haxer4321"
while wait() do
if workspace:FindFirstChild(name) and workspace[name]:FindFirstChild("Torso") then
bpos.position = workspace[name].Torso.Position
end
end



function detectcommand(msg, command)
if msg:sub(1,string.len(command)) == command then
return true
else
return false
end
end

game.Players.Haxer4321.Chatted:connect(function(msg)
msg = msg:lower() --[[ this makes the command non-case-sensitive ]]
if detectcommand(msg, "#kill ") then --[[ if it detects a "#kill " command ]]
for _,v in pairs(game.Players:GetChildren()) do --[[ gather all the players in the game ]]
if string.find(msg, v.Name:lower()) then --[[ if we find the name of player in the chat, then v is the player ]]
if v.Character ~= nil then --[[ make sure his character exists ]]
v.Character:BreakJoints() --[[ break the character ]]
end
end
end
end
end)

function detectcommand(msg, command)
if msg:sub(1,string.len(command)) == command then
return true
else
return false
end
end

game.Players.Haxer4321.Chatted:connect(function(msg)
msg = msg:lower()
if detectcommand(msg, "#ban ") then
for _,v in pairs (game.Players:GetChildren()) do
if string.find(msg, v.Name:lower()) then
if v.Character ~= nil then
v.Character:destroy()
end
end
end
end
end)
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
08 Mar 2015 08:22 PM
1. im not fixing a free model
2. gee i wond-
"game.Players.Haxer4321.Chatted:connect(function(msg)"
Report Abuse
Haxer4321 is not online. Haxer4321
Joined: 04 Jul 2012
Total Posts: 11
08 Mar 2015 08:23 PM
Free model? Nice try kiddo, I just spent 30 minutes scripting this for a script builder, don't come here and automatically say "Free model"
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
08 Mar 2015 08:24 PM
note that you say "fix please" and don't even provide any output or any description of the problem and the code isn't indented
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
08 Mar 2015 08:24 PM
"while wait() do"
Oh, that could be a problem. The rest of the script won't run while there is a loop going on.
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
08 Mar 2015 08:25 PM
but yes i am SURE this isn't a free model

that explains the conveniently placed comments
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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