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: Need help with a script

Previous Thread :: Next Thread 
wilwurm is not online. wilwurm
Joined: 06 Jan 2012
Total Posts: 15
24 May 2016 10:39 AM
I'm new to scripting and I can't figure out how to do this.

The first part of my script works:

CantCollide1 = game.Workspace.Tutorial.TutorialTip6.TutorialTip6CantCollide.TutorialTip6CantCollide1.TutorialIsland

script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid') then
CantCollide1.CanCollide = true
CantCollide1.BrickColor = BrickColor.new("Institutional white")
end

It does the following: As soon as someone touches the parent, the Cantcollide1 block can collide, and changes color.
What i'm trying to get to work though, is that the CantCollide1block changes color to "Really black" and can no longer collide once a player no longer touches the parent.

Note: the parent is not the same block as the Cantcollide1 block.

I'd appreciate it if anyone could help me, and tell me what to add to my script after this.


Report Abuse
runnergavin is not online. runnergavin
Joined: 04 Mar 2013
Total Posts: 468
24 May 2016 10:42 AM
You can't do that rn. ROBLOX is glitched atm.
Report Abuse
wilwurm is not online. wilwurm
Joined: 06 Jan 2012
Total Posts: 15
24 May 2016 10:53 AM
There has to be a way, I've seen it work in multiple games.


Report Abuse
LockFocus is not online. LockFocus
Joined: 31 Aug 2013
Total Posts: 1044
24 May 2016 10:56 AM
CantCollide1 = game.Workspace.Tutorial.TutorialTip6.TutorialTip6CantCollide.TutorialTip6CantCollide1.TutorialIsland

local touch = script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid') then
CantCollide1.CanCollide = true
CantCollide1.BrickColor = BrickColor.new("Institutional white")
end
end)

script.Parent.TouchEnded:connect(function()
CantCollide1.CanCollide = false
CantCollide1.BrickColor = BrickColor.new("color here")
touch:disconnect()
end)
Report Abuse
wilwurm is not online. wilwurm
Joined: 06 Jan 2012
Total Posts: 15
24 May 2016 11:05 AM
Thanks for the help, but unfortunatly it won't help yet


Report Abuse
wilwurm is not online. wilwurm
Joined: 06 Jan 2012
Total Posts: 15
24 May 2016 11:06 AM
*work


Report Abuse
runnergavin is not online. runnergavin
Joined: 04 Mar 2013
Total Posts: 468
24 May 2016 11:17 AM
Read my first comment.
Report Abuse
wilwurm is not online. wilwurm
Joined: 06 Jan 2012
Total Posts: 15
24 May 2016 11:19 AM
I did, but I'm convinced that there is a way


Report Abuse
runnergavin is not online. runnergavin
Joined: 04 Mar 2013
Total Posts: 468
24 May 2016 11:20 AM
but read it again.
Report Abuse
wilwurm is not online. wilwurm
Joined: 06 Jan 2012
Total Posts: 15
24 May 2016 11:22 AM
There, I read it again. Though I'm still convinced that there is a way.


Report Abuse
runnergavin is not online. runnergavin
Joined: 04 Mar 2013
Total Posts: 468
24 May 2016 11:24 AM
Read it again carefully. Pls.
Report Abuse
wilwurm is not online. wilwurm
Joined: 06 Jan 2012
Total Posts: 15
24 May 2016 11:27 AM
Thanks for trying to help me, but telling me to read the first comment over and over again isn't going to get me anywhere. I'm convinced that there is a way, so i'm gonna continue waiting for help from people that actually try to get this script working. Further comments about reading the first comment will be ignored.


Report Abuse
wilwurm is not online. wilwurm
Joined: 06 Jan 2012
Total Posts: 15
24 May 2016 11:40 AM
I got it working, thanks for the script LockFocus.
I discovered the minor mistake in the script.

I no longer need help but if anyone is interested in the script, I'll post it here:
CantCollide1 = game.Workspace.Tutorial.TutorialTip6.TutorialTip6CantCollide.TutorialTip6CantCollide1.TutorialIsland

local touch = script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid') then
CantCollide1.CanCollide = true
CantCollide1.BrickColor = BrickColor.new("Institutional white")
end
end)
script.Parent.TouchEnded:connect(function(Player)
CantCollide1.CanCollide = false
CantCollide1.BrickColor = BrickColor.new("Really black")
touch.Touched:disconnect()
end)




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