local plr = plrs.LocalPlayer
local mouse = plr:GetMouse()
mouse.Button1Down:Connect(function(mouse)
print("Bot has clicked")
local pos = plr.Character.Humanoid.TargetPoint
local LookAt = (pos - plr.Character.Head.Position).Unit
plr.Character:WaitForChild("Shoot"):FireServer(LookAt)
end)
All of the scripts within the StarterCharacter you made (the robot) should be in StarterCharacterScripts. For some reason, scripts within StarterCharacter will not be created when creating the character, so any script you want within the character will have to be put in StarterCharacterScriptsinstead of the StarterCharacter model.