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

How do you make a particle spawn (like keydown)? [closed]

Asked by 5 years ago

Hi im wondering how to make particles spawn on your right arm and by pressing a key?!?

0
You would want to avoid KeyDown. It is deprecated User#19524 175 — 5y
0
We are not a request site. Please make an attempt on your own first. Don't be afraid to make mistakes! RayCurse 1518 — 5y
0
I recommend reading the documentation on "UserInputService." KeyDown is a flawed deprecated method. If you don't know about instances or Instance.new(), you may want to read about that as well. Scripting Helpers is here to help when you've tried something and need help, but not to have something created for you. vanilla_wizard 336 — 5y

Closed as Not Constructive by RayCurse and Shawnyg

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

function player()

game.Players.PlayerAdded:Connect(function(character) char = character.Character end) return char

end

function part(plyr) local vectorU = Vector3.new(3,0,0) p = Instance.new("BasePart") p.CFrame = CFrame.new(plyr.RightArm.CFrame - vectorU) p.Parent = plyr.HumanoidRootPart end

bttn = 'X' -- replace X with your desired key.

delay = false game:GetService('UserInputService').InputBegan:Connect( function(key, other) if not key then return end

if (key.KeyCode == Enum.KeyCode.bttn) and (not delay)

then part(player()); delay = true end wait(.9) delay = false end)

0
Rough script ^^ DaggerOf_Fly -24 — 5y
Ad