|
| 12 May 2012 06:19 PM |
I've made a script for my Mario-like game. This script goes inside an invisible brick near a person (in this case, Toadsworth who debuted in Super Mario Sunshine) and when the script's parent is stepped on, the person brick (brick with a decal on it) that is in the same model will change it's text. If the person who stepped on it has completed 6 levels in my game (indicated on the leaderboard in my game) then the text will be different. If not, then it has normal text. The normal text moved fine, but the alternate text would stop moving at "Wait... it's you!" I'm a novice scripter, so could somebody point out the flaw in the script?
enabled = true function onTouch(part) if not enabled then return end enabled = false ROBLOX=script.Parent.Parent SCRIPT=script.Parent player = game.Players:GetPlayerFromCharacter(part.Parent) ROBLOX.Name="Stand back, please." wait(2) if player ~= nil and player.leaderstats.Level.Value == 6 then ROBLOX.Name="Wait... it's you!" else ROBLOX.Name="I have been ordered to protect this house until Princess Peach returns." wait(2) if player ~= nil and player.leaderstats.Level.Value == 6 then ROBLOX.Name="The hero! You saved Princess Peach, didn't you?" else ROBLOX.Name="Even if she was here, however, you'd need her permission to enter the house." wait(2) if player ~= nil and player.leaderstats.Level.Value == 6 then ROBLOX.Name="Come on. She's been waiting in the house." else ROBLOX.Name="Go along, now." wait(2) ROBLOX.Name="Toadsworth" wait(0.1) enabled = true end end end end script.Parent.Touched:connect(onTouch) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
|
| 12 May 2012 08:32 PM |
20:31:07 - Script "Workspace.Stand back, please..Part.Script", Line 10 20:31:07 - stack end |
|
|
| Report Abuse |
|
|
|
| 12 May 2012 08:37 PM |
| Someone please help! Please! |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
abaw7
|
  |
| Joined: 23 Oct 2009 |
| Total Posts: 745 |
|
|
| 12 May 2012 09:54 PM |
| Have it say print('1') before the line you think it is and print('2') after the line you think it is continue on until you get it to only print 1 then post that line and any variables that may be assoiciated with it. |
|
|
| Report Abuse |
|
|