so i was trying to make my sword fighting simulator and i carry on finding this
“[require(assetId) cannot be called from a client. assetId = 512742721 (rbxopenscript://www.dummy.com/dummy?scriptGuid=%7BBEF5BAB2%2D3947%2D4326%2DA6F5%2D6C13A2D0B080%7D&gst=6#35)”
It’s not clear if you’re using ModuleScripts or not, but if you aren’t, then you’re fine to ignore these. The errors are coming from plugins and internal code, not your own, since the initial testing environment is the client which those plugins can’t run on.
i am not using a moduel script and when i try to play my game it doesnt function bc of the 2 errors can you please tell me how to fix the script in a simple way if you need the script i will make a post tommro about it
-- client
local Replicated = game:GetService("ReplicatedStorage")
local Event = Replicated:WaitForChild("Event")
Event:FireServer()
-- server
local Replicated = game:GetService("ReplicatedStorage")
local Event = Replicated.Event
Event.OnServerEvent:Connect(function(Player) -- player instance is automatically sent over, but you don't need use/have it
-- some sanity checks here in case you don't want people to abuse it.
require(000000) -- require the module from whatever location, or by id if you have uploaded it.
end)
Hope this helps. You can probably figure out how to set things up.
Just never trust the client with any information, check everything on the server.
Thats because u can’t do require(assetid) from a LocaLScript
Then its probably a Plugin or internal Roblox Scripts. If the Stack Traceback points to a Plugin, make sure the plugin is using it for good use and not for malicious stuff, such as inserting a infection