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: [!] CanCollide not going true

Previous Thread :: Next Thread 
TheRobloxian909 is not online. TheRobloxian909
Joined: 08 Aug 2013
Total Posts: 2444
02 Jan 2015 04:19 AM
This is for my holo, so it's a script that opens and closes the map to prevent cheaters going out of the map then entering on the enemies side. Whenever I say :openmap, the parts CanCollide turn false, that bit works, but when I say :closemap the parts CanCollide will remain false.

NOTE: FOLLOW ME IF YOU DONT UNDERSTAND!

admins = {"Dementiz","TheRobloxian909","Irciletalking","SirAnthonyDeSmet"} --Admin names here

function isAdmin(name)
for i,v in pairs(admins) do
if name:lower() == v:lower() then return true end
end
return false
end

local door=script.Parent
game.Players.PlayerAdded:connect(function(p)
if isAdmin(p.Name) then
p.Chatted:connect(function(msg)
if msg:lower() == string.lower(":openmap") then --this can be changed
for i,v in pairs(door:GetChildren()) do
v.CanCollide=false
end
elseif msg:lower() == string.lower(":closemap") then --can also be changed
for i,v in pairs(door:GetChildren()) do
v.CanCollide=true
end
end
end)
end
end)
Report Abuse
TheRobloxian909 is not online. TheRobloxian909
Joined: 08 Aug 2013
Total Posts: 2444
02 Jan 2015 04:35 AM
Actually if you dont understand, party me then I'll tell you when, I'm on afk for 10 mins

Report Abuse
HarrySnotte is not online. HarrySnotte
Joined: 27 Jun 2011
Total Posts: 2854
02 Jan 2015 06:48 AM
Hi, it's you again, lol.
Report Abuse
Paramedic4 is not online. Paramedic4
Joined: 23 Jan 2011
Total Posts: 5934
02 Jan 2015 08:23 AM
Hope this works:

admins = {"Dementiz","TheRobloxian909","Irciletalking","SirAnthonyDeSmet"} --Admin names here

function isAdmin(name)
for i,v in pairs(admins) do
if name:lower() == v:lower() then return true end
end
return false
end

local door=script.Parent
game.Players.PlayerAdded:connect(function(p)
if isAdmin(p.Name) then
p.Chatted:connect(function(msg)
if msg:lower() == string.lower(":openmap") then --this can be changed
for i,v in pairs(door:GetChildren()) do
v.CanCollide=false
elseif msg:lower() == string.lower(":closemap") then --can also be changed
for i,v in pairs(door:GetChildren()) do
v.CanCollide=true
end
end
end
end)
end
end)
Report Abuse
ToxicDominator is not online. ToxicDominator
Joined: 24 Oct 2013
Total Posts: 8373
02 Jan 2015 08:27 AM
Probably because not everything inside the door is a part...
Report Abuse
Paramedic4 is not online. Paramedic4
Joined: 23 Jan 2011
Total Posts: 5934
02 Jan 2015 08:29 AM
If in that case, then:

local door=script.Parent
game.Players.PlayerAdded:connect(function(p)
if isAdmin(p.Name) then
p.Chatted:connect(function(msg)
if msg:lower() == string.lower(":openmap") then --this can be changed
for i,v in pairs(door:GetChildren()) do
if v:IsA("BasePart") then
v.CanCollide=false
end
elseif msg:lower() == string.lower(":closemap") then --can also be changed
for i,v in pairs(door:GetChildren()) do
if v:IsA("BasePart") then
v.CanCollide=true
end
end
end
end)
end
end)

Not sure if it will work but hopefully.
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