This is the local script
local repstore = game:WaitForChild("ReplicatedStorage") local Remote = repstore:WaitForChild("SmokeFlyStart") Player = game.Players.LocalPlayer Mouse = Player:GetMouse() UIS= game:GetService("UserInputService")
UIS.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.R then
Remote:FireServer(Mouse.Hit.p)
wait(5)
end
end)
This is a flying script I'm trying to make 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(I NEED HELP HERE) BV.Velocity = char.HumanoidRootPart.CFrame.lookVector*60 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)
Where it says "I NEED HELP HERE", I can't seem to get the Mouse.Hit.p I've tried mouseval.X,mouseval.Y,mouseval.Z doesn't work Its not local script so Mouse.Hit.p I passed it through the fireserver I just don't know where to go from there.

3 comments
try using a module script
fix your lua brackets
Yeah, it makes it kind of confusing to look at.