✓ Accepted answer
This should all be in a regular script in ServerScript service
Now there are a few problems with your script. First of all, this would instantly error if the player "Abysswalk" wasn't in the game when the script loaded. So in order to get this to never error I would suggest the PlayerAdded event. Like so,
game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
if msg == "Spread" then
end
end)
end)
Okay, now when any player joins the game and chats the Message "Spread" the commented area will activate. Now, if you're trying to make the character Jump when this is Chatted then you would get the character from the player using plr.Character.After that, you would find the Humanoid of the character and activate the Jump property. Like so,
game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
if msg == "Spread" then
plr.Character:FindFirstChild("Humanoid").Jump = true
end
end)
end)
That should work BUT, if you want it to only work for you, you would have to check to see if the player's name was the same as yours. And because when testing on Roblox Studioyour characters name is always just "Player" you should also add that for the check as well. Like so,
game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
if msg == "Spread" then
if plr.Name == "Abysswalk" or plr.Name == "Player" then
plr.Character:FindFirstChild("Humanoid").Jump = true
end
end
end)
end)
Hope that helped! Good Luck!
1 comment
I'm answering this one... 5 minutes xD