|
| 27 Mar 2017 02:03 PM |
I have an int value of 10 and in another part i have both a click detector and a script.
in the script i have:
function onClicked(playerWhoClicked) game.Workspace.IntValue.Value = 100 end script.parent.ClickDetector.MouseClick:connect(onClicked)
This still doesnt change the value of the int value and i cant figure out why...
/End |
|
|
| Report Abuse |
|
|
Atavis
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 1463 |
|
|
| 27 Mar 2017 02:11 PM |
won't work from a local script under FE
121,270 slices of pizza and counting! |
|
|
| Report Abuse |
|
|
Raildex
|
  |
| Joined: 06 Dec 2009 |
| Total Posts: 934 |
|
|
| 27 Mar 2017 02:11 PM |
is it giving you any errors?
local SuperPart = Instance.new("Egg") |
|
|
| Report Abuse |
|
|
Atavis
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 1463 |
|
|
| 27 Mar 2017 02:11 PM |
o wait nvm the error is script.parent
script.Parent
(don't call children parent if it's not a typo)
121,270 slices of pizza and counting! |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2017 02:35 PM |
No error messages but it still doesnt work
/End |
|
|
| Report Abuse |
|
|
Atavis
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 1463 |
|
|
| 27 Mar 2017 02:36 PM |
is parent a child or are you referencing the Parent of the script?
122,306 slices of pizza and counting! |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2017 02:38 PM |
Btw lua is cap sensitive so "Parent" needs to be capitalised.
Rap: 985 R$525 |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2017 02:43 PM |
There is a part and inside the part there is both a click detector and a script
/End |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2017 02:44 PM |
btw i have fixed the capital P
/End |
|
|
| Report Abuse |
|
|
Atavis
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 1463 |
|
|
| 27 Mar 2017 02:45 PM |
function onClicked(playerWhoClicked) game.Workspace.IntValue.Value = 100 end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
122,070 slices of pizza and counting! |
|
|
| Report Abuse |
|
|
Atavis
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 1463 |
|
|
| 27 Mar 2017 02:46 PM |
Scraping the barrel here lol
function onClicked() game.Workspace.IntValue.Value = 100 end script.Parent:FindFirstChild("ClickDetector").MouseClick:Connect(onClicked)
122,070 slices of pizza and counting! |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2017 02:48 PM |
Still doesnt work, it doesnt give any error but it doesnt change the value
/End |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2017 02:49 PM |
Let me help you here.
Rap: 985 R$525 |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2017 02:52 PM |
I just need the button when clicked to change an int value
(the int value isnt inside of the part that the script/click detector is. its just in the workspace)
/End |
|
|
| Report Abuse |
|
|
Atavis
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 1463 |
|
|
| 27 Mar 2017 02:54 PM |
Did you name the ClickDetector something other than ClickDetector?
122,503 slices of pizza and counting! |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2017 02:54 PM |
#code I don't know.
This is a siggy that isnt a siggy. |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2017 02:54 PM |
No the click detector is still called: "ClickDetector"
/End |
|
|
| Report Abuse |
|
|
Atavis
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 1463 |
|
|
| 27 Mar 2017 02:55 PM |
Try throwing your computer out the window.
122,503 slices of pizza and counting! |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2017 02:56 PM |
script.Parent.ClickDetector.MouseClick:connect(function() local Value1 = game.Workspace:FindFirstChild("IntValue") Value1.Value = Value1.Value + 1
end)
Rap: #Rap #Robux |
|
|
| Report Abuse |
|
|
Atavis
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 1463 |
|
|
| 27 Mar 2017 02:57 PM |
Why do you keep changing the logic of people's scripts lol
122,549 slices of pizza and counting! |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2017 03:00 PM |
"Why do you keep changing the logic of people's scripts lol" What do you mean by that.
Rap: 987 R$525 |
|
|
| Report Abuse |
|
|
Atavis
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 1463 |
|
|
| 27 Mar 2017 03:02 PM |
| Value1.Value = Value1.Value + 1 game.Workspace.IntValue.Value = ### ####### slices of pizza and counting! |
|
|
| Report Abuse |
|
|
Atavis
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 1463 |
|
|
| 27 Mar 2017 03:02 PM |
urgh nvm
122,548 slices of pizza and counting! |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2017 03:03 PM |
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
wait(.1)
local hum = character:WaitForChild("Humanoid")
hum.WalkSpeed = game.Workspace.IntValue.Value
end)
end)
This is the other part of the code that is used, this is in a separate script in the workspace
/End |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2017 03:06 PM |
My script work's i tested it so.
Rap: 987 R$525 |
|
|
| Report Abuse |
|
|