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

A script that acts like a local script?

Help i don't know how to actually get into a player's leaderstats help?

while wait() do
if game.Players.LocalPlayer.Character.leaderstats.ChestPlate.Value == 1 then
	script.Parent.Transparency = 0
else
	script.Parent.Transparency = 1
end
end

2 comments

0

What is this part? Why does it care about the level of the player?

0

The LocalPlayer can't be accessed through a Script.

1 answer

✓ Accepted answer

Looking at your script, I see you're changing a Part's Transparency. If you're going to target one player only, but don't know who it will be, you'd need to make it a LocalScript in StarterGui. Such as:

while wait() do
	if game.Players.LocalPlayer.Character.leaderstats.ChestPlate.Value == 1 then -- Just so you know, leaderstats is a child of LocalPlayer
		game.Workspace.Part.Transparency = 0
	else
		game.Workspace.Part.Transparency = 1
	end
end

However, you need to start to think that what if another Player doesn't meet the requirement, yet gets in the door? I won't make the script, but it involves putting parts in their CurrentCamera. Hope I helped! If I didn't, I apologize, but you didn't provide much of an explanation.

1 comment

0

its a single player game but thanks anyways :3

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