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 |
|
|
|
| 24 May 2016 10:42 AM |
| You can't do that rn. ROBLOX is glitched atm. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 06 Jan 2012 |
| Total Posts: 15 |
|
| |
|
| |
|
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 |
|
|
| |
|
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 |
|
|
|
| 24 May 2016 11:24 AM |
| Read it again carefully. Pls. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|