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

PlayerAdded script won't work to change Humanoid? [closed]

Asked by
Hydrogyn 155
7 years ago

This script won't work and I keep on checking the wiki ( wiki.Roblox.com )

The ROBLOX wiki says it is right for the locals of the player but in my Output it says that it is a nil value.

~ Script ~

local Values = game.ReplicatedStorage.Values
local StarterGui = game.StarterGui
local player = game.Players.LocalPlayer
local character = player.Character

function onPlayerAdded(player)
    local player = game:GetService("Players").LocalPlayer
    local character = player.Character
character.Humanoid.WalkSpeed =0
character.Humanoid.JumpPower =0
-- Disabling the Char
end
player.PlayerAdded:connect(onPlayerAdded)

Closed as Non-Descriptive by Goulstem

This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.

Why was this question closed?