The error lies within Line 16 and Line 24
local event = script.Parent
local TweenService = game:GetService("TweenService")
event.OnServerEvent:Connect(function(Player, Ball, Hoop, Position, Release, ShotRating)
print('received')
local dir = {-1, 1}
local force = Hoop.Position+Vector3.new((ShotRating/math.random(ShotRating,100))*dir[math.random(1,2)],20,(ShotRating/math.random(ShotRating,100))*dir[math.random(1,2)])
--if Release == 'not scripted yet' then print'not ready' return end
if Release == 'okay' then
print'okay'
--local RandomChance = math.random(1,3)
--local POWER = Ball.Power.Value
Ball.Parent = workspace
Ball.Handle.Velocity = (Vector3.new(force.Position.X,Hoop.Position.Y,force.Position.X)-Ball.Handle.Position).unit*50
--end
else
print'not scripted yet'
--local RandomChance = math.random(1,3)
--local POWER = Ball.Power.Value
Ball.Parent = workspace
wait()
Ball.Handle.Velocity = (Vector3.new(force.Position.X + math.random(-2, 2),Hoop.Position.Y,force.Position.X)-Ball.Handle.Position).unit*50
--end
end
wait()
Player.PlayerGui.Meter.Enabled = false
end)
Been working on this script for hours, cant figure out what the issue is. The script is supposed to on a KeyDown fired event, this script basically makes a part transport to another brick from the Positions given. I'm assuming one of the Positions inside the Vector3 isn't really a ".Position" type

1 comment
I'll take a wild guess based my own experience and suggest that Ball.Handle.Position needs to be converted to a vector3. If you havent already tried it.