LINX
LINX

Reputation: 13

Roblox Studio: Proximity Prompt Interact

I need an instruction or script using proximity promt. When a character uses proximity promt (hold E), he gets a perk, for example, an increase walking speed and/or an increase health points.

Upvotes: 1

Views: 2540

Answers (1)

Darrian Penman
Darrian Penman

Reputation: 123

If you need an idea of where to start you could think about using the triggered event of the proximity prompt and adding the powerup code inside the function.

proximityPrompt.Triggered:connect(function(player)
    --Power Up Code:
    local character = player.Character
    character.Humanoid.WalkSpeed = 100
end)

This is just meant to give you a rough idea of what the code would look like. Max Health would also be found in Humanoid.

Here are some links that might help: Proximity Prompts: https://create.roblox.com/docs/building-and-visuals/ui/proximity-prompts Power Ups: https://create.roblox.com/docs/education/coding-3/powerups-with-if-statements

Upvotes: 1

Related Questions