So I am trying to make a spear That Launches when the Player Activates the Spear Tool **NOTE: 2 scripts, One Local, Other Server, (Remote Events)(I am launching the Handle of the tool) **
**local script: **
local tool = script.Parent.Parent
local player = game.Players.LocalPlayer
local mouse = player:GetMouse().Hit.p
local Remote = script.Parent:WaitForChild("RemoteEvent")
tool.Activated:Connect(function()
Remote:FireServer(mouse)
end)
**ServerScript: **
local Remote = script.Parent.RemoteEvent
local tool = script.Parent.Parent
local TweenService = game:GetService("TweenService")
local Spear = script.Parent
Remote.OnServerEvent:Connect(function(player,mouse)
local char = player.Character
local humanoidrootpart = char.HumanoidRootPart
local distance = (humanoidrootpart.Position - mouse).Magnitude
local goal = {Position = mouse}
local info = TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0)
local tween = TweenService:Create(Spear,info,goal)
tween:Play()
print(distance)
end)
**NOTE: print(distance) works and it does print **
I even checked the main Discord for Help, but nobody knows what's the issue with it,I've been trying to fix this for 3 days straight, I am starting to think that this is a studio bug, if it isn't correct me
