What can I do to make this more fluent? (basketball mypark playing script.)
court = script.Parent.Parent
spot1 = court.Spot1
spot2 = court.Spot2
playing = court.Playing
playing.Changed:Connect(function(play)
if play == true then
local ball = game.Lighting.Ball:Clone()
court.theBall.Value = ball
local plr1 = spot1.plrOn.Value
court.Team1.plr1.Value = plr1
plr1.PlayerGui.InGame.Value = true
plr1.Backpack.Assets.Team.Value = spot1.Team.Value
plr1.Backpack.Assets.OpponentTeam.Value = spot1.oTeam.Value
local plr2 = spot2.plrOn.Value
court.Team2.plr1.Value = plr2
plr2.PlayerGui.InGame.Value = true
plr2.Backpack.Assets.Team.Value = spot2.Team.Value
plr2.Backpack.Assets.OpponentTeam.Value = spot2.oTeam.Value
wait()
plr1.Character.Torso.CFrame = court.Side1.CFrame + Vector3.new(0,2,0)
plr2.Character.Torso.CFrame = court.Side2.CFrame + Vector3.new(0,2,0)
wait(2)
plr1.Character.Humanoid.PlatformStand = false
plr1.Character.Torso.Anchored = false
plr2.Character.Humanoid.PlatformStand = false
plr2.Character.Torso.Anchored = false
ball.Parent = workspace
ball.Court.Value = court
ball.Position = court.Side1.Position + Vector3.new(0,2,0)
script.Parent.Parent.shotclock.Value = 24
script.Parent.Parent.shotclock.run.Value = true
--ball.Anchored = true
end
end)