local playerName = OykkoIsBack
Players.(playerName).Character.Humanoid.JumpPower = 100
so I want to set my jump power to the variable that has the players name? im new to roblox
scripting and this happened in my output
Expected identifier, got '('
something similar to this happened
i wrote this if game.Workspace.IntValue.Value = 0 then
print("Value is 0")
but i figured this out by adding a another = but this time i can't figure it out so i need someone to help me!
really appreciate it if you could help me!
Ok well, First we're going to save a text inside the variable "playerName", This text will be the player's name
local playerName = "OykkoIsBack"
Then we will build a path to the Players folder, obviously doing "game.Players" Then we're going to use the variable, since we aren't starting the line with the variable, we need to use [ ] so the variable works correctly, like this
local playerName = "OykkoIsBack" game.Players[playerName]
Now we successfully have a path to the player, now we just go inside the character, humanoid and set their Jump Power to what we want
local playerName = "OykkoIsBack" game.Players[playerName].Character.Humanoid.JumpPower = 100
Yet, I like setting both JumpPower and JumpHeight to 0, just in case, IDK why but yeah...
local playerName = "OykkoIsBack" game.Players[playerName].Character.Humanoid.JumpPower = 100 game.Players[playerName].Character.Humanoid.JumpHeight = 100