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 = false, but the block still collides?

Previous Thread :: Next Thread 
LetsAllGo is not online. LetsAllGo
Joined: 10 Oct 2012
Total Posts: 182
06 Jun 2017 01:09 PM
block = script.Parent

if script.Parent.Parent:FindFirstChild('readyBool').Value then
script.Parent.Touched:connect(function(Hit)
if Hit.Parent:FindFirstChild('Humanoid') ~= nil and Hit.Parent:FindFirstChild('Humanoid').Health > 0 and script.Parent:FindFirstChild('activated').Value ~= true then
script.Parent:FindFirstChild('activated').Value = true
block.CanCollide = false
for i= 1, 500 do
block.Position = block.Position - Vector3.new(0, 1, 0)
wait()
end
block:Destroy()
end
end)
end


As you can see in the script I disable CanCollide, and in-game it shows it is disabled on the part, so why does it still bounce off the player? Feel free to test my script around in-game to see what currently happens. Thank you for the assistance as I have been sitting here for a while testing, and thinking to myself "What is the problem?"


Report Abuse
LetsAllGo is not online. LetsAllGo
Joined: 10 Oct 2012
Total Posts: 182
06 Jun 2017 01:10 PM
Forgot to mention, the purpose of the script is for the block to fall thru the world when a player touches it.


Report Abuse
Knucklesskjf_GT is not online. Knucklesskjf_GT
Joined: 28 Aug 2016
Total Posts: 210
06 Jun 2017 01:29 PM
Try this script :

script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if script.Parent.Parent.readybool.Value then
if script.Parent.activated.Value ~= true and hit.Parent.Humanoid.Health > 0 then
script.Parent.activated.Value = true
script.Parent.CanCollide = false
for i = 1, 500 do
script.Parent.CFrame = script.Parent.CFrame - Vector3.new(0, 1, 0)
wait()
end
script.Parent:Destroy()
end
end
end
end)
Report Abuse
LetsAllGo is not online. LetsAllGo
Joined: 10 Oct 2012
Total Posts: 182
06 Jun 2017 01:39 PM
The CFrame worked, thanks!


Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
06 Jun 2017 01:40 PM
bcuz position doesnt ignore obstructions
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