The script is not working, and is giving me this error Workspace.Player1.LocalScript:8: 'do' expected near 'game'
player = game.Players.LocalPlayer
character = game.Players.LocalPlayer.Character
gun = character:findFirstChild("Rifle")
mouse = player:GetMouse()
mouse.Button1Down:connect(function()
function getModel(raw)
for _,__ in next game.Workspace:children'' do
if raw:IsDescendantOf(__) then
return __;
end;
end;
return raw;
end;
local success,hum = pcall(function() return getModel(mouse.Target).Humanoid end);
hum.Health = hum.Health -15
end)

4 comments
I still get the same error of do expected near 'game'
try in next (workspace:GetChildren()) do (with the extra ()'s on the outside.)
ok, thats fixed but now i get the error of "Workspace.Player1.LocalScript:17: attempt to perform arithmetic on field 'Health' (a nil value)"
pcall returns 2 values by default, succes state and error. do: local succes,error,value = pcall(function() OR local succes,error = pcall(value = function()