I need help with my bone throw weapon the click detector part in the script

i need help with a tool called bone throwi need help with the click detector part when you click the bone throws because i already got the cframe and all that stuff done i just need help with this for some reason and if someone could help me that would be Great! :confused:

What exactly are you needing help with? I’m a bit confused.

with a tool like its called bone throw its from undertale i want to do when you click it launches the bone like a rocket launcher but bones

Do you have any code you need to have looked at or are you asking if anyone can make it for you?

no i just need help with the click detector part

Send me your code for the click detector and we can go from there.

this is the client: local tool = script.Parent
local handle = tool:WaitForChild(‘Handle’)
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local debounce = true

tool.Activated:Connect(function()
local humanoid = tool.Parent:FindFirstChildWhichIsA(‘Humanoid’)
if humanoid and debounce == true then
debounce = false
local position = mouse.Hit.Position
tool.RemoteEvent:FireServer(position)
wait(3)
debounce = true
end
end) and this is the server:local tool = script.Parent
local handle = tool:WaitForChild(‘Handle’)
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local click = Mouse.KeyDown:connect(function(key)
if key == “MouseButton1” then
game.Workspace.Bone = CFrame.new(122.4, 2.75, 22.1)
end
end)

For starters, where is the RemoteEvent being sent to? - tool.RemoteEvent:FireServer(position)

oh that was for rocket launcher cuz i was tryna see if i can put like rocket launcher script on the bone throw

localscript:

local tool = script.Parent
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local debounce = true

tool.Activated:Connect(function()
local humanoid = tool.Parent:FindFirstChildWhichIsA(“Humanoid”)
if humanoid and debounce == true then
debounce = false
local position = mouse.Hit.Position
tool.RemoteEvent:FireServer(position)
wait(3)
debounce = true
end
end)

ServerScript:

local tool = script.Parent
local character = tool.Parent;
local player = game.Players:GetPlayerFromCharacter(character);
local mouse = player:GetMouse()

mouse.Button1Down:Connect(function()
game.Workspace.Bone = CFrame.new(122.4, 2.75, 22.1)
end)

I have to go right now, you have some issues with the code, but i’ll help when I’m back. My discord is Wubbles #3883 if you want to talk there so this thread isn’t huge.

1 Like