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.
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
1 | local remote = game.ReplicatedStorage:WaitForChild( "RemoteEvent" ) -- always wait for the remote event unless you want a nil error |
2 | remote.OnClientEvent:Connect( function (subject) -- When remote event is called |
3 | game.Workspace.CurrentCamera.CameraSubject = subject --make the camera focus on the subject/part |
And then in a script
01 | local remote = game.ReplicatedStorage:WaitForChild( "RemoteEvent" ) --Remote event |
02 |
03 | local npc = game.ReplicatedStorage:FindFirstChild( "NPC" ) -- The npc (Change name to npc) |
04 |
05 | local npclone = npc:Clone() --Clone the npc |
06 |
07 | local player = game.Players:GetPlayers() [ math.random( 1 ,#game.Players:GetPlayers()) --Chooses a random player |
08 |
09 | player.Character = npclone --Set the character to the npc |
10 |
11 | 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.