So, I’ll be direct : I have no idea what that means, despite my researches.
Basically, I get this error in my output about one of my remote events, I don’t understand what it means, or if it has something to do with my script.
It only happens while in a server (Like TeamTest or joining from roblox’s app/website), but not in studio itself (except TeamTest).
Here’s the script, just in case it’s needed.
Please redirect me if there is a solution somewhere else. Thank you.
Triggers the Remote Event. (‘‘Client’’ Context script in a model’s part from ReplicatedStorage)
local t = true
local function destroy(hit)
if t == true then
if hit.Parent:FindFirstChild('Humanoid') then
t = false
local character = hit.Parent.Name
local player = game.Players:FindFirstChild(character)
game.ReplicatedStorage.SendCredits:FireServer(player)
task.wait(0.02)
script.Parent.Parent:Destroy()
end
end
end
script.Parent.Touched:Connect(destroy)
Recieves the Remote Event. (‘‘Legacy’’ Context script in ServerScriptService)
local rep = game:GetService('ReplicatedStorage')
rep.SendCredits.OnServerEvent:Connect(function(player)
local reward = math.random(50,250)
player.stats.Credits.Value += reward
print(player.Name..' got '..reward..'$')
end)
(I have to add that the error is present without even running the scripts, and that the model spawns in workspace via another local script. It makes the error while joining the game/TeamTest)
Client scripts only run if they are inside a model somewhere in Workspace. See this article for more information. However, since Touched will fire on the server, and Legacy context server scripts will run if they are inside Workspace, you could just combine your two scripts into one where the code that ran when the SendCredits RemoteEvent fired gets run upon the Touched event getting fired. If you want to keep the same structure, try using bindable-events or having a client-sided script somewhere in PlayerScripts, or one of the other allowed locations for them to run.
This is a Roblox bug, not something on your end. You don’t need to (and can’t) do anything to fix it.
It also does not impact your scripts, so you can just ignore it.
Hi, there are a few issues in your code that are causing these issues in your server script, so from what I understand, you are trying to earn “coins” (for example) and when you tap on them you get some random amount of money, right? If that is what I said, I would try to help you.
In any case i did an example for this situation if this is what you meant, this would help you to fix issues:
SERVER SIDE SCRIPT (example!)
local part = workspace.Part
local signal = game:GetService("ReplicatedStorage").SIGNAL
local state = false
local function generateMoney(hit: Instance)
if state then return end
local character = hit.Parent
local player = game:GetService("Players"):GetPlayerFromCharacter(character)
if player then
state = true
part:Destroy()
local randomAmount = math.random(50, 250)
signal:FireClient(player, randomAmount)
end
end
part.Touched:Connect(generateMoney)
CLIENT SIDE SCRIPT (example!)
local signal = game:GetService("ReplicatedStorage").SIGNAL
signal.OnClientEvent:Connect(function(amount)
print("You get: $" .. amount)
-- or just what you wrote earlier >>> player.stats.Credits.Value += amount
end)
This should resolve these issues with your scripts, so if you encounter other problems, feel free to ask for help.
didn’t get what u mean and what are you talking about, due it i do not understand completely what you trying figure out or do, like what is the issue in your script? which part doestn work correctly?
Well looking again it says “RobloxReplicatedStorage” not “ReplicatedStorage” where it errors, unless you renamed the replicatedstorage service which I highly doubt. So actually now i’m thinking it could just be a backend problem on roblox’s end.
What you can try and do is, when you start running a session in studio. View every roblox script and try and find the keyword “SendLikelySpeakingUsers” to see where the error is coming from.
But I think you should be fine overall. My guess is roblox is adding a new update in relation to age check chatting and they haven’t completed it yet. That’s why they haven’t hooked up an event yet to that remote event they fired.