local script

local debounce = false

script.Parent.MouseButton1Click:Connect(function()
	if not debounce then debounce = true
		
		local Create = script.InputVal.Value
		
		game.ReplicatedStorage.AllianceCreator:FireServer(Create)
		print("fired to server")
		
	
		
		wait(3)
		debounce = false
	end
end)

normal script inside serverscriptservice

game.ReplicatedStorage.AllianceCreator.OnServerEvent:Connect(function(Create)
local NewAll = Instance.new("StringValue")
NewAll.Parent = game.ServerScriptService.AllianceData.Alliances
NewAll.Value = Create
end)

as the other page told me I should have been able to send a string value through the remote event via FireServer() when I run the game instead of bringing up the player it brings up an error, its NewAll.Value = Create

8 comments

0

you cant access existing members of playergui from the server

0

so then what would I do to overcome this?

0

the client

0

you could use a remote function to retrieve the values but i wouldnt recommend invoking the client. in the remote event, just send those values along in the :FireServer(). then u dont rlly have to change anything

0

but im having problems with it, I stored the string value from the client inside a value and then sent that value through FireServer:() but it keeps returning my name instead of the value its supposed to use

0

edit your question and include the local script

0

mantorok, your problem with the RemoteEvent is probably that you didn't realize that the OnServerEvent event adds a player argument to the ones provided it. Here's the documentation: https://developer.roblox.com/api-reference/event/RemoteEvent/OnServerEvent