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!
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.