I'm trying to add an extra position for my give to teleport and a pad to teleport with it. Here's my script: This is the Give script, the give part is invisible:
local randomValue
local position1 = Vector3.new(-66.32, 5.572, -92.15)--(-66.91 -100.99)
local position2 = Vector3.new(-66.32, 5.572, -106.94)--(-66.91 -100.99)
script.Parent.Touched:Connect(function(Hit)
randomValue = math.random(1,2)
local player = game.Players:GetPlayerFromCharacter(Hit.Parent.Parent)
print(Hit.Parent.Name)
local char = Hit.Parent
if Hit.Name == 'JobBox' then
print('BOXHIT')
script.Parent.Parent.Anim.Value = 'false'
script.Parent.Parent.Taken.Value = 'false'
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 2
Hit:Destroy()
script.Parent.Parent.AnimScript.Disabled = true
script.Parent.Parent.AnimScript.Disabled = false
if randomValue == 1 then
script.Parent.Position = position1
else
script.Parent.Position = position2--I want to add an extra value
end
end
end)
Here's the pad script. The pad isn't invisible so you can see the pad:
while true do
script.Parent.Position = script.Parent.Parent.Give.Vector3(0, -3, 0)
wait(0.001)
end
I want the pad to keep teleporting to the Give.
Thank you.

1 comment
I've edited my answer for that pad script