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

Local Script For Specific Person?

Asked by 4 years ago

Can i make a local script for me or my friends in my game?

0
Localscripts are only for the computer it is running on (your computer).  Only you will see it changes made in a localscript. What are you trying to do? We can figure out a solution. royaltoe 5144 — 4y
0
You could simply add a check that yields the scripts unless you or your friend is the parent of the script. JoyfulPhoenix 139 — 4y
0
I answered this, your post is not very descriptive... I would look at some other peoples posts and look at how to post things such as this. I can't help you by much as you aren't very descriptive. If you update this post, comment on my answer. Just2Terrify 566 — 4y

2 answers

Log in to vote
0
Answered by
iactz 15
4 years ago
Edited 4 years ago

This isn't a request site but welp

So basically a local script is Client Sided I think is what you would call it which means that only the player can see it.

So a way to do it would to do something like this. I'm a scripting noob but this should work (hopefully)

Make a button or a part

Button:

--put this in a local script in ServerScriptService or in workspace I don't think it would matter.
local LP = game.Players.LocalPlayer
local Button =  --Put the path to your button

if LP.Name == "Friends user" then
    Button.Visible = true
    --Now the button is only visible for them I believe :D
    --If you have more then one friend just copy and paste and change the name
end)

And when you use the buttons you can put a script or local script depending if you want everyone to see them or just your friend. If you want different things to happen then you would make different buttons visible for different people!

Part:

--in a local script yet again :D
local LP = game.Players.LocalPlayer
if LP.name == "Friends user" then
script.Parent.Touched:Connect(function()
    --script here
end)
end

If you have anymore questions contact me on discord: actz#2680

Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

LocalScripts

Localscripts are only used for the Client. Meaning, anything that's done in a local script is only happening for you.

The Question

Yes, you can make a localscript in studios in your own game. Yes, you can make it so it's only given to certain players through a serverscript. Yes, you can give your script to your friends by making it a model and sending it to them.

Errors in this post

Please do understand this is not a request site and we are here to help with coding. We are not here to help with very simplistic questions such as yours. If you can make a script in Studios then you can make a script and send it to your friends by making it a model. This is very common knowledge for anyone who uses studios. If you don't know this then you need to look over every aspect of studios before continuing to script, develop or designing any type of game.

ScriptingHelpers

We are scripting helpers, not studio helpers. We are here to help you with your code. If you have a question about Studios itself, there are YouTube videos for such a thing.

Answer this question