|
| 17 May 2016 04:02 PM |
I'm pretty bad with player variables, and wanted to make a script that when a player is on a certain part, so "onTouched" the player would have to say a certain word, and a part's transparency will be set to 1, and will be walkable through.
players = game.Players.LocalPlayer LetsWork = game.Workspace.LetsWork Radio = game.Workspace.Radio
function onTouched () if players.Character.Text == "ICarly" then Radio.Transparency = 1 Radio.CanCollide = false else Radio.Transparency = 0 Radio.CanCollide = true end end
script.Parent.onTouched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 17 May 2016 04:03 PM |
| Already see some things I could have done wrong, although u guys can drop some help comments into the forum. |
|
|
| Report Abuse |
|
|
Korniak
|
  |
| Joined: 09 Aug 2013 |
| Total Posts: 3538 |
|
|
| 17 May 2016 04:09 PM |
is text inside the player when the player is spawned
Korniak, the antler dude |
|
|
| Report Abuse |
|
|
|
| 17 May 2016 04:10 PM |
| Hello again :). And nope, Should I use Chat or Bubble Chat to replace text? |
|
|
| Report Abuse |
|
|
Korniak
|
  |
| Joined: 09 Aug 2013 |
| Total Posts: 3538 |
|
|
| 17 May 2016 04:12 PM |
What is the script supposed to do?
Korniak, the antler dude |
|
|
| Report Abuse |
|
|
|
| 17 May 2016 04:15 PM |
| wanted to make a script that when a player is on a certain part, so I used the "onTouched"Function so that, the player would have to say a certain word, while its on that part, and then the wall infront of the player transparencies would be set to 1, and it will be throughougly walkable in. |
|
|
| Report Abuse |
|
|
Korniak
|
  |
| Joined: 09 Aug 2013 |
| Total Posts: 3538 |
|
|
| 17 May 2016 04:19 PM |
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg == "iCarly" then Radio.Transparency = 1 Radio.CanCollide = false else Radio.Transparency = 0 Radio.CanCollide = true end end) end)
Korniak, the antler dude |
|
|
| Report Abuse |
|
|
|
| 17 May 2016 04:23 PM |
you make it look quite easy! haha. Is there a way to use that script with the other function form, or do u suggest i switch my function form? |
|
|
| Report Abuse |
|
|
Korniak
|
  |
| Joined: 09 Aug 2013 |
| Total Posts: 3538 |
|
|
| 17 May 2016 04:25 PM |
I see what type of game you're making.
You pretty much have to use this form, unless you're aiming for something unlike the other "Guess the _" type games.
Korniak, the antler dude |
|
|
| Report Abuse |
|
|
| |
|