local access = (“friend, or person”) game.ReplicatedStorage = Player.PlayerAdded() Local doge =game.Player(function(player) end)
COMMUNITY QUESTION
I made a roblox script about a attack doge for my friend is it wrong?
1 answer
It depends on what you NEED. If you want a attack on touch script, you can follow this: (Expecting that the doge follows any player)
-- LocalScript
script.Parent.Touched:connect(function(part)
if part.Parent:FindFirstChild("Humanoid") then
part.Parent.Humanoid:TakeDamage(30)
end)
-- this script makes the parent of it (assuming your localscript for damage is inside a part) deal "30" damage (which can be changed to whatever you like)
-- you have to put this localscript in a part, so whenever that part touches the player, the player gets -30 (or any value) damage.
Let me know if there is something wrong!
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Srry I’m new idk how to do this stuff
what is this code?
I don't think you even know the basics, go on youtube and search up a scripting tutorial and learn the basics