nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
|
| 07 Jan 2014 02:53 PM |
Basicly. im making this, Really,REALLY, epic rpg atm. lol. But the teleports have levels. thats ok. yes? but. the home teleport don't really count for levels yes? so i want to change it to health = 100%. but it keep breaking. imma show you how the script looks like now. :D ----------------------------------- 1 player = script.Parent.Parent.Parent.Parent 2 h = instance.new("hint") 3 h.parent.parent.parent.game.Workspace = Workspace 4 Lvl = player.leaderstats.Lvl 5 function teleport() 6 if Human.Health.Value >= 40 then --[[ <-- this line here, is the buggy one ]] 7 player.Character.Torso.CFrame = CFrame.new(Vector3.new(780.9, 67.6, 727.7))else 8 h.text= "Health is not at max, Keep fighting, or die." 9 end 10 end 11 script.Parent.MouseButton1Down:connect(teleport) --------------------------------------- ok ? it don't really matter about the hint. just the 6th line
|
|
|
| Report Abuse |
|
|
DataStore
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 8540 |
|
|
| 07 Jan 2014 02:55 PM |
| Where have you defined "Human" may I ask? |
|
|
| Report Abuse |
|
|
nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
|
| 07 Jan 2014 02:56 PM |
NO questions :DDDD. just fix :) tell me what i did wrong. and try to correct. remember. i want it to allow the human to teleport, when his hp is at max, im making an rpg so typing just 100, not gonna work :( . |
|
|
| Report Abuse |
|
|
Thaeh
|
  |
| Joined: 05 Feb 2011 |
| Total Posts: 7685 |
|
|
| 07 Jan 2014 02:59 PM |
| paste the whole script or else we can't debug |
|
|
| Report Abuse |
|
|
nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
|
| 07 Jan 2014 03:05 PM |
umm that is the whole script :) . if you like i can note where this script is, what model it is in and that thing.
here :::::: >STARTERGUI <------ In a Starter gui Hp filler +Pvp Defeat script manaregen +HUD +InformationGUI >Teleporterspells V3 +close >teleport1 Main <-------THERE +teleport2 +teleport3 --------------------------------------------------------------
|
|
|
| Report Abuse |
|
|
nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
| |
|
Thaeh
|
  |
| Joined: 05 Feb 2011 |
| Total Posts: 7685 |
|
|
| 07 Jan 2014 03:07 PM |
you didn't set a variable for Human so you're requesting a nil value
set Human to the humanoid first k |
|
|
| Report Abuse |
|
|
nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
|
| 07 Jan 2014 03:10 PM |
:::::: +STARTERGUI <------ In a Starter gui -------Hp filler -------Pvp Defeat script -------manaregen -------HUD -------InformationGUI -------+Teleporterspells V3 -------------close -------------+teleport1 --------------------Main <-------THERE -------------teleport2 -------------teleport3 -------------------------------------------------------------- script.parent.parent.parent = Main.teleport1.TeleportspellV3.STARTERGUI |
|
|
| Report Abuse |
|
|
nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
|
| 07 Jan 2014 03:13 PM |
Please Post in script. Like,,, Example:
'' Here nabin, this is the script -------------------------------- SCRIPTY SCRIPT SCRIPTTTTTTTT ILUVSCRIPTING DONT YOu HATE THIS??? RANDOMNESSS Function iswhen you fix it duh??? ---------------------------------- there you go nab :D '' but just dont do that XDDDD |
|
|
| Report Abuse |
|
|
Thaeh
|
  |
| Joined: 05 Feb 2011 |
| Total Posts: 7685 |
|
|
| 07 Jan 2014 03:14 PM |
wtf did you even read my last post u didnt declare the variabale Human, what are u doing m8 |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2014 03:14 PM |
1 player = script.Parent.Parent.Parent.Parent 2 h = swag.instance.new("hint") 3 h.parent.egg.parent.parent.game.Workspace = Workspace 4 Lvl = player.leaderstats.Lvl 5 function swagteleport() 6 if Human.Health.Value >= 40 then --[[ <-- this line here, is the buggy one ]] 7 player.Character.Torso.CFrame = CFrame.new(Vector3.new(780.9, 67.6, 727.7))else 8 h.text= "Health is not at max, Keep fighting, or die." 9 end 10 end 11 script.Parent.egg.MouseButton1Down:connect(teleport)
Not enough eggs and swag. |
|
|
| Report Abuse |
|
|
nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
|
| 07 Jan 2014 03:19 PM |
Your telling me, you don't know how to fix it? i mean it should be easy to fix. but i just don't have the knowledge. plus this was from a model i got earlier. If you like i will post the lvl script for it aswell. --------------------------------------------------------- player = script.Parent.Parent.Parent.Parent Lvl = player.leaderstats.Lvl function teleport() if Lvl.Value >= 35 then player.Character.Torso.CFrame = CFrame.new(Vector3.new(910.515, -1.805, 691.375)) end end script.Parent.MouseButton1Down:connect(teleport) --------------------------------------------------------- that was the normal version. come on its a simple script, atleast help.? i mean it aint gonna waste time. copy paste ^^^, then fix ^.^
|
|
|
| Report Abuse |
|
|
Thaeh
|
  |
| Joined: 05 Feb 2011 |
| Total Posts: 7685 |
|
|
| 07 Jan 2014 03:21 PM |
jesus
ok
change Health to this
player.Character.Humanoid |
|
|
| Report Abuse |
|
|
nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
|
| 07 Jan 2014 03:25 PM |
THANK YOU. So.... umm.... do i write. ------------------------------- player = script.Parent.Parent.Parent.Parent h = instance.new("hint") h.parent.parent.parent.game.Workspace = Workspace Lvl = player.leaderstats.Lvl function teleport() if player.Character.humanoid.health = 100% then player.Character.Torso.CFrame = CFrame.new(Vector3.new(780.9, 67.6, 727.7))else h.text= "Health is not at max, Keep fighting, or die." end end script.Parent.MouseButton1Down:connect(teleport) ------------------------------ or do i remove the .health. making it ----------------------------- player = script.Parent.Parent.Parent.Parent h = instance.new("hint") h.parent.parent.parent.game.Workspace = Workspace Lvl = player.leaderstats.Lvl function teleport() if player.Character.humanoid = 100% then player.Character.Torso.CFrame = CFrame.new(Vector3.new(780.9, 67.6, 727.7))else h.text= "Health is not at max, Keep fighting, or die." end end script.Parent.MouseButton1Down:connect(teleport) -------------------------------- One or two. Remember one thing k? i want the life in percentages :)
|
|
|
| Report Abuse |
|
|
Thaeh
|
  |
| Joined: 05 Feb 2011 |
| Total Posts: 7685 |
|
|
| 07 Jan 2014 03:26 PM |
pls rewrite your code it looks ugly, very ugly
you have to use perfect punctuation, coding is case-sensitive |
|
|
| Report Abuse |
|
|
nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
|
| 07 Jan 2014 03:28 PM |
NONNONONO, i think i got it. Should i do: if Health = maxhealth then something like that? .. gonna check on tomorow. |
|
|
| Report Abuse |
|
|
Thaeh
|
  |
| Joined: 05 Feb 2011 |
| Total Posts: 7685 |
|
|
| 07 Jan 2014 03:31 PM |
oh man please learn to organize your code man, also learn how to capitalize
wow |
|
|
| Report Abuse |
|
|
nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
|
| 08 Jan 2014 10:23 AM |
Is this good enough? ------------------------------------------------ 1 player = script.Parent.Parent.Parent.Parent 2 Lvl = player.leaderstats.Lvl 3 function teleport() 4 if Player.Character.Human.Health = MaxHealth then --[[ <-- this line here, is the buggy one ]] 5 player.Character.Torso.CFrame = CFrame.new(Vector3.new(780.9, 67.6, 727.7)) 6 end 7 end 8 script.Parent.MouseButton1Down:connect(teleport) --------------------------------- --------------------------------- --------------------------------- Ok listen up ;D. to make it clear. First of all i want to fix this script, so that it allows people to teleport when click on this gui. but i only want them to go to the location when there health is at max/100%. So there is no cheating! |
|
|
| Report Abuse |
|
|
nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
|
| 08 Apr 2014 03:41 PM |
Soz for this forum, i was a newbie back then. i know how to script it now.
need to use --- Health1 = script.Parent.Parent.Parent.Character.Humanoid
while true do if Health1.Health <= Health1.MaxHealth then -- do something --script.Parent.Visible = false (example) elseif Health1.Health == Health1.MaxHealth then --script.Parent.Visible = true end end ----
i look back, and i see a noob :3 . feel so nooby... |
|
|
| Report Abuse |
|
|
|
| 08 Apr 2014 03:44 PM |
| oh lord, are you trying to crash them? you have no wait(). |
|
|
| Report Abuse |
|
|
Superfryx
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 3253 |
|
|
| 08 Apr 2014 03:47 PM |
| I have a feeling you do not know how to script at all, and is just copying other scripts. |
|
|
| Report Abuse |
|
|
SETTINGUP
|
  |
| Joined: 18 Feb 2014 |
| Total Posts: 10 |
|
| |
|
nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
|
| 09 Apr 2014 03:31 PM |
calm down people!!! its a breif description. i aint bothered to write the whole script down, gosh!!!
ok let me give you a breif idea of what i mean. --- gui = script.Parent button = gui.Button
while true do if gui.Parent.Parent.Character.Humanoid.Health == gui.Parent.Parent.Character.Humanoid.MaxHealth then Button.Visible = true else if gui.Parent.Parent.Character.Humanoid.Health<= gui.Parent.Parent.Character.Humanoid.MaxHealth then button.Visible = false end end --- BASIC BY THE WAY I DO KNOW HOW TO SCRIPT :P
You dunno me, so i don't expect you to know.
|
|
|
| Report Abuse |
|
|
nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
|
| 09 Apr 2014 03:33 PM |
* wait() after while true do . |
|
|
| Report Abuse |
|
|
|
| 09 Apr 2014 03:34 PM |
| You say you know how to script, but you think Humanoid is Human? Really? |
|
|
| Report Abuse |
|
|