Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

IntValue is not added into rs with fe enabled?

Asked by 5 years ago

This is what I have so far, it works in studio but not in game..

game.Workspace.CukieCave.CukieChair.DialogPart.Dialog.DialogChoiceSelected:connect(function(player,choice)
    if choice.Name == "ParkourMission" then
        local gao = Instance.new("IntValue", game.ReplicatedStorage)
        local thing = game.ReplicatedStorage:FindFirstChild("Value")
        if thing then
            print("Good")
        end
    end
end)
0
assign the Parent as a separate line because doing it with parenthesis doesn't work anymore DeceptiveCaster 3761 — 5y

1 answer

Log in to vote
0
Answered by
Fifkee 2017 Community Moderator Moderation Voter
5 years ago

FE is completely different from Experimental mode.

If you try to insert something into the game that you want the server to see via LocalScript, the server will not acknowledge it. This is what makes games so reinforced and unexploitable. Use a RemoteEvent to create an object, like this.

game.ReplicatedStorage['Create Item']:InvokeServer('Part', workspace)

And when a serverscript catches it, you can do

game.ReplicatedStorage['Create Item'].OnServerInvoke = function(player, part, parent)
    local Part = Instance.new(part, parent)
    return Part
end

Do NOT try to use it as a event. For some reason, it can be defined but can't be an event. I don't know why.

0
Here's the thing that confuses me. The script above is in server script service. Does that change anything? ProjectJager 62 — 5y
0
No, it shouldn't. In the ROBLOX Wiki, the author states "A semantic, organized place to put your server-sided game logic, which does not interfere with the world. Scripts will run inside this service, and will not replicate to game clients, allowing for secure storage of your scripts." Therefore, it should not cause any problems as LONG as it isn't a LocalScript. Fifkee 2017 — 5y
Ad

Answer this question