How to make local model or local npc

Hi devs! I have a question How to make local model or local npc
Like that script, can i make local model or npc?

script.Parent.Touched:Connect(function(hit)
	local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
	if player then
		local plr = game.Players.LocalPlayer
		if (player and player == plr) then
			script.Parent.Transparency = 1
		end 
	end
end)

(End of the code)

What do you specifically mean by “local model” ?

I mean the model that only local player can see

Yes you can make using LocalScript.

If you have seen a door that unlocks for specific person for example, it basically uses LocalScript.

like adding a local script in starterplayerscripts?

If it’s a script inside NPC, then it should be inside NPC, and if a script inside player, then inside StarterPlayerScripts ofcourse.

If it helps you, don’t forget to mark as a solution! :slight_smile:

1 Like

I made a npc move script and can i write it to local script that is inside the npc?

Yes, surely you can write it, if it’s not NPC spawner.

1 Like

Then can i make a local model with local script?

Yes, surely, you can do it easily.

1 Like

Thanks thats helped me a lot! now i can make it myself

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.