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

Local script doesn't work and is not responsive?

Asked by 6 years ago
Edited 6 years ago

I'm making this clickdetector function where, when player clicks, it should call remote event which will then be listened by a script in serverScriptService, Here's Structure

That's script in localScript, But thing is that it does nothing!!! It may not do anything after line2, but it doesn't even print

print("hay")
script.Parent.MouseClick:Connect(function(player)

    game:GetService("ReplicatedStorage").RemoteBuy:FireServer()
end)
1
If it doesn't print the first line the script isn't running. It's either disabled or misplaced. gullet 471 — 6y
0
It is not Disabled and I get same result If I place simple 1 line print("Hello World") local script in workspace GooierApollo664 183 — 6y
0
local scripts have to be in replicatedfirst, a player GUI, a character, or a player's "PlayerScripts" User#22604 1 — 6y
0
ouch. nothing worse than giving a completely wrong answer :( OBenjOne 190 — 6y
0
It's very interesting cause this kind of setup has been working for moths but with server script. One day it started giving an error FireServer can only be called from client GooierApollo664 183 — 6y

1 answer

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

LocalScript = ClientScript

Client = Player LocalScript = Script for Player

Script = ServerScript Server = Workspace or ServerScriptService and more.

Don't use LocalScript "ClientScript" with the server. Use Script "ServerScript".

ServerScript ClientScript

0
what do you mean "workspace or serverscriptservice and more" there's nowhere else you can put it that it can run User#22604 1 — 6y
Ad

Answer this question