Disclaimer: I am reposting this because I originally posted this question WAAAAY too late at night so nobody noticed it.
--------------------------------------------------------------------------------------------------------------------------------I want to make a game mode where when you join the Players Team, you have low gravity. I also can't change gravity in the workspace because I don't want the people who die to be able to jump still.
I tried this but...
local Playing = game.Teams.Players if game.Players.LocalPlayer.Team == Playing then game.Players.LocalPlayer.JumpForce = 34 end
... it doen't work /:
First, you should make a Script, in ServerScriptService to let the client know which team is playing.
Teams = { game.Teams.RedTeam; game.Teams.BlueTeam; }; -- game.ReplicatedStorage.CurrentTeam is an ObjectValue while wait(60 * 5) do -- 5 minutes per round if game.ReplicatedStorage.CurrentTeam.Value == Teams[1] then game.ReplicatedStorage.CurrentTeam.Value = Teams[2] else game.ReplicatedStorage.CurrentTeam.Value = Teams[1] end end
The client, anywhere but ServerScriptService, a LocalScript:
local MyTeam = game.Players.LocalPlayer.TeamColor game.ReplicatedStorage.CurrentTeam.Changed:connect(function() if game.ReplicatedStorage.CurrentTeam.TeamColor ~= MyTeam then workspace.Gravity = 216 -- default gravity else workspace.Gravity = 50 -- low gravity end end
Note: JumpForce
does not exist, however, JumpPower
does.
Player's character properties are found in: game.Players.PlayerNameHere.Character.Humanoid
Hope I helped!