How can i ignore that position ?
Script:
Event.OnServerEvent:Connect(function(Player,Dist)
local DragonH = game:GetService("ReplicatedStorage").WaterDragon:Clone()
DragonH.Parent = game.Workspace.DragonDebris
DragonH:SetPrimaryPartCFrame(Player.Character.HumanoidRootPart.CFrame * CFrame.new(1,7,1))
DragonH:SetPrimaryPartCFrame(CFrame.lookAt(DragonH.PrimaryPart.Position,Tool:GetAttribute("MousePos")))
Tool.Roar:Play()
wait(1)
local PosPart = Instance.new("Part",game.Workspace)
PosPart.Anchored = true
PosPart.Transparency = 1
PosPart.CFrame = Tool.MouseCFrame.Value
PosPart.Position = Tool:GetAttribute("MousePos")
tweenModel(DragonH,PosPart.CFrame)
DragonH:SetPrimaryPartCFrame(CFrame.lookAt(DragonH.PrimaryPart.Position,PosPart.Position))
wait(1)
local DragonVFX = game.ReplicatedStorage.DragonVFX:Clone()
DragonVFX.MeshHitbox.OwnerId.Value = Player.UserId
DragonVFX.Parent = game.Workspace.DragonDebris
DragonVFX:SetPrimaryPartCFrame(PosPart.CFrame)
DragonH:Destroy()
tweenModelSize(DragonVFX,0.75,10,"Linear","In")
wait(1)
DragonVFX:Destroy()
PosPart:Destroy()
end)
Tool.SA.OnServerEvent:Connect(function(Player,MousePos,MouseOrigin)
Tool:SetAttribute("MousePos",MousePos)
Tool.MouseCFrame.Value = MouseOrigin
end)
Local Script:
Tool.Activated:Connect(function()
local Event = Tool.Event
local Distance = (Player.Character.HumanoidRootPart.Position - Mouse.Hit.Position).magnitude
if Distance < 250 then
if Deb == false then
Deb = true
Mouse.TargetFilter = game.ReplicatedStorage.WaterDragon
Event:FireServer(Distance)
local ToolName = script.Parent.Name
for i=6,1,-1 do
script.Parent.Name = "["..i.."]"
wait(1)
end
script.Parent.Name = ToolName
Deb = false
end
else
if Deb2 == false then
Deb2 = true
local ReportUI = Tool.ReportUI:Clone()
ReportUI.Parent = Player.PlayerGui
for i=0,1,.1 do
ReportUI.ReportFrame.TextLabel.TextTransparency = i
wait(.1)
end
Deb2 = false
ReportUI:Remove()
end
end
end)
local Equipped = false
Tool.Equipped:Connect(function()
Equipped = true
end)
Tool.Unequipped:Connect(function()
Equipped = false
end)
game["Run Service"].RenderStepped:Connect(function()
if Equipped == true then
Tool.SA:FireServer(Mouse.Hit.Position,Mouse.Origin)
wait(.3)
end
end)