Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to add damage to a part made by scripting that goes on the player?

Asked by
AizakkuZ 226 Moderation Voter
5 years ago

I've already asked this once but got ignored ;(. Basically, I've made a part through scripting and welded it to the player after the player entered the game. but I'm of course having trouble adding damage since I can't ask a question without a script or it's against the rules (apparently). So here is a script that I've tried that didn't work and I want to know why they never worked as it doesn't make sense that a script won't recognize something even when it is actually in the game.

plr = game:GetService("Players").LocalPlayer
RP = game.plr.RightPunch

script.Parent:Clone(plr, RightPunch)
0
Just a guess, but maybe try changing game.plr.RightPunch to plr.RightPunch on line 2. This is because it's a variable, it doesn't need game at the front. Chardinok 5 — 5y
0
oh AizakkuZ 226 — 5y
0
Found out the issue was (plr, RightPunch) as I should've made plr.character a variable and put that there as like (char, RightPunch) but thanks for trying to help me at all since no one else tried. AizakkuZ 226 — 5y

Answer this question