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

Script running on Studio but not Working on my published place?

Asked by 7 years ago
Edited 7 years ago

Hi again ScriptingHelpers Community!,

I have a little problem here, I made a script based on the API documentation, and a big informative help about a user from this community.

My script it's supossed to Play an animation when the Player press LShift and Stop it progressively when you release the LShift Button, we're good here.

My problem is: When I published to Roblox (my place) with the Script on the "StarterPack" folder and Play my place, it doesn't work. I mean that it looks like it's not being loaded.

So my question is: What am I missing?

I really appreciate any help you can provide.

Edit: This is what I've placed on top of the script in order to get the LocalPlayer

--// Services
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")

--// Local Variables
local player = Players.LocalPlayer

--// .... code
0
Are you using a localscript? B/c if you're using "LocalPlayer" & the "UserInputService," it's required to use it. TheeDeathCaster 2368 — 7y
0
Yes, well, I think so, I'll update the post with the a part of the code I'm using JohnnyS_Sinns 27 — 7y
0
A localscript has a little person on it, while a server script is just a script with nothing on it. Which one are you using? Mayk728 855 — 7y
0
You mean a Dummy? I've one of those placed on it but I used it only for animations. Is that what you mean? JohnnyS_Sinns 27 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

Use a local script!


Whether you're using Filtering Enabled or not, you need to use a LocalScript for any of the following:

  • User Input
  • Graphical Interface
  • LocalPlayer

Note:

LocalScripts don't work in places like ServerScriptService, Workspace, Storage/Lighting.


Having a local script in StarterPack would work fine.

(If you're still having trouble, add some print statements and press f9 while in a server to view the log.)
0
I though that the script you pasted on my last question was a LocalScript and I'm based on it. It's on the StarterPack as you said. There's nothing on server when I hit F9. JohnnyS_Sinns 27 — 7y
0
Local Script code isn't the same as a Local Script. You have to put the code in a Local Script. OldPalHappy 1477 — 7y
0
Oh, I was misunderstanding the meaning of LocalScript, I thought it was the same thing. My script doesn't have any error (in this particular case). I was saving it as a "script" instead of a "localscript". Again, Thank you very much for your help! JohnnyS_Sinns 27 — 7y
Ad

Answer this question