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

What is the wrong in this remote event script?

i wanna put a script inside a Value This is my script

game.Players.PlayerAdded:Connect(function(plr)
	local leaderstats = plr:WaitForChild("leaderstats")
	local won = plr.leaderstats:WaitForChild("Won")
	wait(1)
	local rank = Instance.new("StringValue",leaderstats)
	rank.Name = "Rank"
	
	
local Event = game.ReplicatedStorage:WaitForChild("RemoteEvent")
local InsertScript = game.ReplicatedStorage:WaitForChild("Script")
	Event:FireServer(Event,InsertedScript,rank)
	
	end)

Output : FireServer can only be called from the client

4 comments

0

Why are you using :FireServer on a server-sided script?

0

What do you want the script to do? Like testimonent said, that's wrong, but I think it would help better if you'd tell us what you want to happen with it.

0

What are you even trying to do...

0

legend

2 answers

u cant use fire server from a non local script; the output states this very clearly.

4 comments

0

dont call my answer short u 15 year old egotistical experienced game creator using a tempered programming language that posts ur games on a site inhabited with gremlins thats about to criticize on my vocab and language

0
  • not referenced
0

Answer doesnt need to be any longer, this sufficiently explains the very simple issue user is having.

0

u can from a module script

The issue is exactly what the error says it is; you cannot use :FireServer from the server. If you are trying to fire the client, use :FireClient(Player) or :FireAllClients. If you are trying to fire another ServerScript, switch to BindableEvents.

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