You can write your topic however you want, but you need to answer these questions:
Hey, So I’ve been working on a project recently, I’ve come across an issue which I’ve tried, and still doesn’t work.
I am trying to get these lines below, from a local script into a script, and running it every .5 - 1.5 seconds.
tostring(math.floor(realSpeed+.5))
and
tostring(math.floor(RealHeading+0.5))
I have tried using a remote function but I did not get any results I wanted. These lines are used in the local script, I have also tried a remote event and still unsure on the way I could get these variables and place as a text in a text label.
What’s not working? Can you please be a little more descriptive? You’ve just given us 2 lines of code and asked to solve problems you haven’t even told us about.
I’m not sure if this is what you want, but you could just
So, I have a local script that is a gui that runs when a user is flying it, It has altitude, speed and heading as variables inside of the local script. this is the local script. I would like to try and get these two lines(posted above) from this local script to another gui.
You can try making NumberValues in ReplicatedStorage, and set the value of those to the value of the variables in the updateGui script, and then use those values in the second script.
Basically,
Make 2 NumberValues in ReplicatedStorage
Name them RealSpeed and RealHeading
In the localscript with the updateGui function, at the end of the function set the value of them with something like
Then, in the second localscript, at the top of the while loop, write
while true do
wait(0.15)
local realSpeed = ReplicatedStorage.RealSpeed.Value
local RealHeading = ReplicatedStorage.RealHeading.Value
<REST OF THE CODE HERE>