Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make If Player Is in A Team It Will morph That player With A morph Mesh/Character?

When A Player is in enemy team it automatically morphs the player to a team morph That can be seen by Other Players Client Too, How do I do that? And Where do I Put It?

1 answer

✓ Accepted answer

You can use Remote Events

Firstly, make a remote event instance in replicated, then name it "morphTo", we fire it and provide the team name

local morphTo = game:GetService('ReplicatedStorage').morphTo

morphTo:FireServer(player.Team.Name)

Second, make a server script and parent it to server script service and define 2 variables as its morphs

local redMorph = -- link those to the morph characters, you can rename the variables to whatever you want
local blueMorph = 

local morphTo = game:GetService('ReplicatedStorage').morphTo

morphTo.OnServerEvent:Connect(function(player, team)
	if team == 'red' then
		local cloned = redMorph:Clone()
		cloned.Parent = workspace

		player.Character = cloned
		player:LoadCharacter()
	else
		local cloned = blueMorph:Clone()
		cloned.Parent = workspace

		player.Character = cloned
		player:LoadCharacter()
	end
end)

5 comments

0

Sorry, But Im New to Scripting Where do i Put local morphTo = game:GetService('ReplicatedStorage').morphTo morphTo:FireServer(player.Team.Name)?

0

Localscript, PlayerScriptsService

0

and if you want to set the player character to the morph upon joining, wrap it around an Players.PlayerAdded event

0

with a player parameter

0

Thx

This discussion is preserved as it was. New answers, comments, and votes are closed.