When i am testing my game in studio, I am recieving this message in the output bar:
22:30:48.306 - Script 'Players.Player.PlayerGui.NewTruckSpawnGUI.TruckInfo.InfoBox.Spawn.Spawn', Line 13
22:30:48.306 - Stack End
What do I do to fix this? here is the script it is referring to:
Service1 = game:GetService("InsertService")
Service2 = game:GetService("BadgeService")
GUI = script.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Click:connect(function()
local Player = script.Parent.Parent.Parent.Parent.Parent.Parent
local Label = Player.PlayerGui.CargoGUI.Information
if workspace:FindFirstChild(Player.Name.." Truck") == nil then
local model = Service1:LoadAsset(script.ID.Value)
local TruckName = script.Parent.Parent.Parent.NameLabel.Text
model.Name = Player.Name.." Truck"
model.Model.VehicleSeat.Vars.Owner.Value = Player.Name
local tab = Service1:Insert(model)
model:MoveTo(workspace:FindFirstChild("Regen"..GUI.Regen.Value).Pos.Position + Vector3.new(0,5,0))
Label.Text = TruckName.." spawned."
GUI:Remove()
else
Label.Text = "Delete your old truck first!"
end
end)

2 comments
That isn't the whole error, can you include the entire error?
Question titles should describe your problem, not just say 'there is a problem'. Edit your question to have a descriptive, specific title that doesn't describe 90% of the questions on this site.