local tool = script.Parent
local UIP = game:GetService("UserInputService")
local Remote = tool:WaitForChild("RemoteEvent")
local player = game.Players.LocalPlayer
local char = player.Character
local root = char:WaitForChild("HumanoidRootPart")
local Debounce = 1
local anim = script.Animation
local track = char.Humanoid:LoadAnimation(anim)
local ic = script.InstaCast
local Tool = script.Parent
local toolquip = false
local hrp = char.HumanoidRootPart
local mouse = player:GetMouse()
local holdconnecting = tool:WaitForChild("HoldConnecting")
local function Equipped()
print(". . . Detected Equip")
toolquip = true
end
local function UnEquipped()
print(" . . . Detected Unequip")
toolquip = false
end
Tool.Equipped:Connect(Equipped)
Tool.Unequipped:Connect(UnEquipped)
UIP.InputBegan:Connect(function(Input, GPE)
if GPE then return end
if Input.KeyCode == Enum.KeyCode.E and Debounce == 1 and toolquip == true then
print("Local Script Recieved Input . . .")
Debounce = 2
spawn(function()
ic = true
wait(0.41)
ic = false
end)
track:Play()
wait(0.15)
track:AdjustSpeed(0)
local anchor = Instance.new("AlignPosition")
local rootattach = Instance.new("Attachment")
rootattach.Parent = root
anchor.Attachment0 = rootattach
anchor.Position = root.Position
holdconnecting:FireServer(char)
if (root.Position - mouse.Hit.Position).Magnitude >= 2 then
while Debounce == 2 do
wait()
root.CFrame = CFrame.lookAt(root.Position,mouse.Hit.Position)
end
end
end
end)
UIP.InputEnded:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.E and Debounce == 2 then
repeat wait() until ic == false
print(". . . Sending To Server")
track:AdjustSpeed(1)
Debounce = 3
Remote:FireServer(char, player, UIP, tool)
print(". . . SENT . . .")
wait(4) -- cooldown
Debounce = 1
end
end)
were you able to find a fix?
β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β
Move the event call upwards, also remove the AlignPosition stuff on the client.
still not working at the top too
Not sure whatβs wrong here I donβt have time, just try debugging with print statements.
β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β ββ β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β ββ β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β ββ β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β
does anyone else know how to fix?
(I cant not reply to u βCEOOFTROLLINGβ sorry)