local repstore = game:WaitForChild("ReplicatedStorage") local Remote = repstore:WaitForChild("SmokeFlyStart")
Remote.OnServerEvent:Connect(function(player)
local char = player.Character
for i, v in pairs (char:GetChildren()) do
if v.ClassName == "Part" or v.ClassName == "MeshPart" then
v.Transparency = 1
end
end
local Smoke = game.Lighting.Smoke:Clone()
Smoke.Parent = char.HumanoidRootPart
local BV = Instance.new("BodyVelocity",char.HumanoidRootPart)
BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
for i = 1,200 do
wait()
char.HumanoidRootPart.CFrame = CFrame.new(char.HumanoidRootPart.Position,***Mouse.Hit.p***)
BV.Velocity = char.HumanoidRootPart.CFrame.lookVector*90
end
for i, v in pairs (char:GetChildren()) do
if v.ClassName == "Part" or v.ClassName == "MeshPart" then
if v.Name ~= "HumanoidRootPart" then
v.Transparency = 0
end
end
Smoke:Destroy()
BV:Destroy()
end
end)
I'm fairly new to scripting and this has been giving problem. Not sure if I'm suppose to create more variables. Is there a way to read the Mouse.Hit.p and transfer somehow?

6 comments
even though this causes a bit of latency, you should probably use remote events
^ and really, no need to WaitForChild on a service. That's stupid and they will exist. And don't use Lighting as storage, that is not what it's for.
yes.
Thats not really answer my question.
So what? I'm just giving tips so you can be a better coder.
Didn't meant that personally.