Im trying to make a controllable train, and to do that im using simple parts in the cab that the player can click, that then change a value. The value works, the engine can read it and adjust its speed fine, but cant get the value to change, I’ve looked everywhere, even tried Discord, nothing. Also, side note, this is my first ever time messing with values.
function onClicked()
script.Parent.Parent.Parent.Speed.Value = script.Parent.Parent.Parent.Speed.Value + 10
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
This is all I have so far, any ideas would be cool
structure tree.