Hey there!
So, I already have a topic of this problem, let me explain what I have been trying to do.
I want to make a location system where a script locates how much distance there’s from main block (where script is located) to another workspace block or model. This is for vehicles.
Then, when the script already located the model or block, it should calculate how much seconds or minutes (aprox.) there are until the model reaches main block.
With that information, the script checks inside the located model, on the vehicle body, a text label with is a destination (because it’s a bus). When script get’s that information, with all the rest of information, Inside the main block (where as I said, script is located there) there are some different text labels, and the script just needs to display all the taken information of how much left for the bus or vehicle to arrive, the text label (destination) & all that the script got, (except distance witch only will be displayed on minutes/seconds).
I’ve already tried making that kind of system but didn’t get results, nothing is working and there are no apparently errors on console or with script, (you have an url with the other topic about this).
So here is the old script witch didn’t got me with any results after a lot of modifications or anything that people told me on forum.
local targetBlock = workspace.BMC
local mainBlock = workspace.Model
local label1 = workspace.Model.SignFront.Front.Line1.Time
local label2 = workspace.Model.SignBack.Back.Line1.Time
local targetLabel = workspace.BMC.Main.Body.Destination.MainSign.SurfaceGui.Num
while true do
local distance = (targetBlock:GetPivot().Position - mainBlock:GetPivot().Position).Magnitude
local timeInMinutes = distance / 60
if timeInMinutes <= 1 then
label1.Text = "Inminente"
label2.Text = "Inminente"
else
label1.Text = targetLabel.Text
label2.Text = targetLabel.Text
end
targetLabel = workspace.BMC.Main.Body.Destination.MainSign.SurfaceGui.Num
label1.Text = targetLabel.Text
label2.Text = targetLabel.Text
wait(10)
end
So, i’m asking to someone who is interested on helping me out with this, to simply re-make the script for making that functions as I explained, as I think re-using again this script is not getting anywhere after trying with it a lot of times.
Thanks to anyone who is interested on helping me with this, I’ll be looking for replies, do not dude on asking any other information for complete script or system!