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

How to make the player character change to a monster?

Asked by 3 years ago

Hey fellow ScriptingHelper users, I'm doing a game based on the steam game called Deceit, you may not know it but its a multiplayer horror game which there is normal humans and two infected, the infected gotta drink blood to transform into a "zombie". I did the blood drinking script but I don't know how to make the infected transform while full blood, I've tried doing LoadCharacter but didn't work, anyone has a idea???

LyricalFrog3.

1 answer

Log in to vote
0
Answered by
kepiblop 124
3 years ago

I done one with my game, and it turned out pretty well I will try my best to explain everything!

Create a new remote event inside replicatedStorage

In a local script

local remote = game.ReplicatedStorage:WaitForChild("RemoteEvent") -- always wait for the remote event unless you want a nil error
remote.OnClientEvent:Connect(function(subject) -- When remote event is called
game.Workspace.CurrentCamera.CameraSubject = subject --make the camera focus on the subject/part

And then in a script

local remote = game.ReplicatedStorage:WaitForChild("RemoteEvent") --Remote event

local npc = game.ReplicatedStorage:FindFirstChild("NPC") -- The npc (Change name to npc)

local npclone = npc:Clone() --Clone the npc

local player = game.Players:GetPlayers()[math.random(1,#game.Players:GetPlayers()) --Chooses a random player

player.Character = npclone --Set the character to the npc

remote:FireClient(player,npclone:FindFirstChild("Humanoid",true)) -- made it recurse just in case i dont know where you parent your humanoid

If it works, it should make the player turn into the npc! Let me know if it works! Hope i explained it well, I really dont want this to count as spoonfeeding.

0
Fun fact: You can use the remote event for spectating too! kepiblop 124 — 3y
0
I will test it now, I accepted the answer because the script really seems it will work! I appreaciate you for spending time to help me. LyricalFrog3 45 — 3y
0
Its nothing, your welcome! kepiblop 124 — 3y
Ad

Answer this question