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

Local script doesn't work and is not responsive?

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)

5 comments

1

If it doesn't print the first line the script isn't running. It's either disabled or misplaced.

0

It is not Disabled and I get same result If I place simple 1 line print("Hello World") local script in workspace

0

local scripts have to be in replicatedfirst, a player GUI, a character, or a player's "PlayerScripts"

0

ouch. nothing worse than giving a completely wrong answer :(

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

1 answer

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

1 comment

0

what do you mean "workspace or serverscriptservice and more" there's nowhere else you can put it that it can run

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