local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(Character)
local Humanoid = Character:WaitForChild("Humanoid")
function SpinnerWalkSpeed()
Humanoid.WalkSpeed = 0
if Humanoid.UseJumpPower == true then
Humanoid.JumpPower = 80
else
Humanoid.JumpHeight = 25
end
print("SpinnerSpeed")
end
function DefaultWalkSpeed()
Humanoid.WalkSpeed = 16
if Humanoid.UseJumpPower == true then
Humanoid.JumpPower = 50
else
Humanoid.JumpHeight = 7.2
end
print("DefaultSpeed")
end
--What is happening here?
SpinnerWalkSpeed()
DefaultWalkSpeed()
end)
end)
Where are you putting this script in? I tried this script on ServerScriptStorage and it works on my end. This was added onto a separate script by itself btw.
Can you send a picture of this script in the sidebar? of the game settings/ Game tab/ Explorer
Because why are you calling server Script service in a server script?
if you’re doing this after the players’ character is added it won’t work…
Please just make a loop that loops through all players in-game, and changes their walk speed.
No, I was just experimenting. Here’s the script that goes with that. (if it wasn’t commented out)
local rep = game:GetService("ReplicatedStorage")
local SpinnerWalkSpeed = rep.WalkSpeedEvents:WaitForChild("SpinnerWalkSpeer")
local DefWalkSpeed = rep.WalkSpeedEvents:WaitForChild("DefWalkSpeed")
SpinnerWalkSpeed.OnClientEvent:Connect(function()
local player = game.Players.LocalPlayer
local char = player.CharacterAdded:wait()
local h = char.Humanoid
h.WalkSpeed = 0
h.JumpPower = 80
end)
DefWalkSpeed.OnClientEvent:Connect(function()
local player = game.Players.LocalPlayer
local char = player.CharacterAdded:wait()
local h = char.Humanoid
h.WalkSpeed = 16
h.JumpPower = 50
end)
This is false, I have done it just now. It works perfectly fine, this only applies if the characters you are changing is already getting edited by another script
Weird, there was another post a long time ago that was saying to do this in local script. I assumed that roblox’s newest update has fixed that issue. As it wasn’t working for me on Server scripts.
Did you read what I said 6 posts up?, also I accounted for that, in mine. But what you’re trying to do needs something else, Also why do you need the same line in the server script if you not even going to use it?
Apparently, in line where you try to declare a SpinnerWalkSpeed() was probably a mistake.
Its either you had a function the same name as the event “SpinnerWalkSpeed” or you were trying to send the signal onto the event but in a incorrect way.
Also, I didn’t see any functions inside the Main Script nor was I alerted that the script was changed, as I noticed that the variables were commented and no sight of functions the same as you tried to declare it. Did you get an error of some kind related to “Attempt to call nil”?