I had a ‘bug’ where one punch did way more damage than supposed (Can’t replicate it).Is it dangerous to make a debounce on the client to not fire a RemoteEvent whenever ‘F’ is pressed? If so, are there other possibilities to not fire a RemoteEvent every time?.Shall I assign Connection and DealDamage() (both in RemoteHandler) inside the PlayerPunch function or leave it as it is?.I got a few points where I’m not sure whether I can do like I did. Local PunchAnimation = Humanoid:LoadAnimation(Animation) Local Humanoid = Character:WaitForChild("Humanoid") Local Animation = script:WaitForChild("Animation") Local RStorage = game:GetService("ReplicatedStorage") Local Script: local Players = game:GetService("Players") Local RightHand = Character:WaitForChild("RightHand")Ĭonnection = RightHand.Touched:Connect(DealDamage) Local Character = Player.Character or Player.CharacterAdded:Wait() Local Humanoid = Character:FindFirstChild("Humanoid") Local Punch = Remotes:WaitForChild("Punch") Local Remotes = RStorage:WaitForChild("Remotes") RemoteHandler: local RStorage = game:GetService("ReplicatedStorage") Every punch can only deal damage to one person (20 for each punch). I made a simple punch script, where the player needs to press ‘F’ to punch.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |