I don´t even know in which category I should put this.
So, the part is detecting the ball, around 10-20 studs before it´s even close to it, here´s a video:
RealProof.wmv (176.9 KB)
Also, I can´t make it so you can watch the video, if you know how, please tell me.
Have you got any ideas why this is happening?
Here´s the code that detects the ball:
local db = true
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local roundInfo = ReplicatedStorage.roundInfo
script.Parent.Touched:Connect(function(part)
if part:FindFirstChild("Ball") and db then
roundInfo.Team1.Value += 1 --Changes the Team points amount
roundInfo.LastToScore.Value = part:FindFirstChild("LastTouch").Value
db = false
wait(1)
db = true
end
end)
When Team.Value is changed it fires this module:
--Emits particles
local Particles = script.Particles:Clone()
Particles.Parent = gameBall
Particles:Emit(300)
gameBall.Anchored = true
wait(1)
Particles:Destroy()
gameBall:Destroy()
--Creates new ball
gameBall = ball:Clone()
gameBall.Parent = map
local ballScript = script.BallScript:Clone()
ballScript.Parent = gameBall
ballScript.Enabled = true
So, what´s going on?