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

Why did FE just break almost everything..?

Asked by 6 years ago

I swear this is so annoying, making scripting seem harder to new users then what it already is, anyways I was just wondering how to fix a team-spawns, because when new users join my game there is an option for them to pick their team, now I managed to fix it to where whichever team they pick they join however the dont spawn on the correct spawn location anymore..

All the colors are the same of the spawns and teams.

0
Make sure that you are using Remote Events (http://wiki.roblox.com/index.php?title=Remote_Events_and_Functions) And also don't change server-side things with a local script (EXAMPLE: adding a part to the workspace with a local script, etc...) The only things you can change with a local script are client side things (http://wiki.roblox.com/index.php/Client-Side_Scripting_and_Server-Side_Scripting) ragingskull182 67 — 6y
0
Yeah, do it through remote events and read (http://wiki.roblox.com/index.php?title=Experimental_Mode) for more info on FE. Viking359 161 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

In order to move a player to a team spawn location using filtering enabled, you have to do this:

Put a folder in ReplicatedStorage named "Events" and put however many remote events for however many teams in the Events folder named "RedTeam", "BlueTeam" and so on...

Put a LocalScript in the Gui that you are using and write this:

local Event = game.ReplicatedStorage.Events.RedTeam --Or Blue Team. It would need to go in a separate script though.

script.Parent.MouseButton1Down:connect(function()
    Event:FireServer()
end)

Put a Script in either ServerScriptService or the Workspace and write this:

game.ReplicatedStorage.Events.RedTeam.OnServerEvent:connect(function(plr)
    plr.TeamColor = "Really red"
    plr.Character:MoveTo(RedTeamSpawnLocation)
end)

game.ReplicatedStorage.Events.BlueTeam.OnServerEvent:connect(function(plr)
    plr.TeamColor = "Really blue"
    plr.Character:MoveTo(BlueTeamSpawnLocation)
end)
Ad

Answer this question