|
| 05 Mar 2012 05:25 PM |
script.Parent.DialogChoiceSelected:connect(function(player, choice) if (choice == script.Parent.Choice1) then H = Instance.new("IntValue") H.Name = GobKills H.Parent = player elseif (choice == script.Parent.Got) and player.leaderstats:FindFirstChild("GobKills" == true) and player.leaderstats.GobKills.Value == 5 then script.Parent.Got.ResponceDialog = "Like I said, Here is your reward!" wait(6) script.Parent.Got.ResponseDialog = "" else script.Parent.Got.ResponseDialog = "Gome back when you get it." wait(6) script.Parent.Got.ResponseDialog = ""
end end)
This works, No error's but when I select Choice1 Nothing happens, The IntValue GobKills is not in the Players or Player! Help. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
| 06 Mar 2012 03:44 PM |
| I'll rewrite it, gimme a sec. |
|
|
| Report Abuse |
|
|
|
| 06 Mar 2012 03:48 PM |
You forgot quotes around a string, and there was a spelling mistake in 'response'.
Dialog = script.Parent Dialog.DialogChoiceSelected:connect(function(player,choice) if choice == Dialog.Choice1 then Instance.new("IntValue",player).Name="GobKills" --found error elseif choice == Dialog.Got and player.leaderstats:findFirstChild("GobKills").Value >= 5 then Dialog.Got.ResponseDialog = "Like I said, here is your reward!" --give reward wait(6) Dialog.Got.ResponseDialog = "" else Dialog.Got.ResponseDialog = "Come back when you get it." wait(6) Dialog.Got.ResponseDialog = "" end end)
|
|
|
| Report Abuse |
|
|
| |
|
| |
|