You can write your topic however you want, but you need to answer these questions:
-
I Want to make a fireball…
-
The fireball touches the other part before it does that. https://youtu.be/w4Bjv_eJsfE
However, The fireball works by using body force to make it resist gravity and The assemblyLInearVelocity to push toward the target.
Remotes["Activated."].OnServerEvent:Connect(function(Player, Direction: Vector3)
local Character = Player.Character or Player.CharacterAdded:Wait()
local Sound = Instance.new("Sound")
Sound.SoundId = "rbxassetid://17299679453"
Sound.Parent = Character.PrimaryPart
Sound:Play()
local FireBall = Tool["Gaurds fire particle"]:Clone()
FireBall.Parent = workspace
FireBall:SetAttribute("Enabled", true)
for Index, Descendant in FireBall:GetDescendants() do
if Descendant:IsA("ParticleEmitter") then
Descendant.Enabled = true
end
end
FireBall.CFrame = Character["Right Arm"].CFrame * CFrame.new(0,0,-4)
local BodyForce = Instance.new("BodyForce")
BodyForce.Parent = FireBall
BodyForce.Force = Vector3.new(0,workspace.Gravity * FireBall:GetMass(),0)
FireBall.AssemblyLinearVelocity = CFrame.new(Character.HumanoidRootPart.Position, Direction).LookVector * 150
end)
It might be detecting touching the player which launched it or the baseplate or maybe you have some invisible or very translucent part which handles the collision which is too big.
Can you send the script that detects the fireball touching objects?
Here is the the script you asked me to provide.
local Part = script.Parent
local Debouncer = false
local Debris = game:GetService("Debris")
local CriminalShield = "Criminal shield."
local Shield = "Shield."
local Sound = Instance.new("Sound")
Sound.SoundId = "rbxassetid://17299956384"
Part.Touched:Connect(function(OtherPart)
if Debouncer == true then return end
Debouncer = true
if Part:GetAttribute("Enabled") ~= true then return end
local OtherPartParent = OtherPart.Parent
local Player = game.Players:GetPlayerFromCharacter(OtherPartParent)
if Player then
if Player.Team == game.Teams["Wizard Prisoners"] or Player.Team == game.Teams["Wizard Outlaws"] then
local Humanoid: Humanoid = OtherPartParent.Humanoid
local Character = Player.Character or Player.CharacterAdded:Wait()
Sound.Parent = Character.PrimaryPart
Sound:Play()
Humanoid:TakeDamage(20)
Debris:AddItem(Part, 2)
local Attachment = Part["Fire."]
Attachment.orange:Emit(100)
end
elseif OtherPart.Name == CriminalShield and not Debouncer then
Debouncer = true
Sound.Parent = OtherPart.PrimaryPart
Sound:Play()
OtherPart:SetAttribute("Health", OtherPart:GetAttribute("Health") - 20)
local Attachment = Part["Fire."]
Attachment.orange:Emit(100)
Debris:AddItem(Part, 2)
else
Part.Anchored = true
Sound.Parent = Part
Sound:Play()
local Attachment = Part["Fire."]
Attachment.orange:Emit(100)
Debris:AddItem(Part, 2)
end
end)```
Try adding a print
statement to see what part it touched
I Did, It is touching the correct part.
Hmm, what is the collision detection script’s parent? Have you checked that its hitbox isn’t too big?
It is a 2,2,2 sphere, I Believe it is pretty small.
I Have found that things only happen to the client, Now, How can I stop that from happening to the client?
Do you have any LocalScripts that could cause this? If not, it might be lag.
I Am using tool activated event, Is there is something better than it?
I don’t think so, the problem described seems very different
What it could be about, If not network issiue?