Basically, i have 2 scripts, 1 local script, which gets player data and some other things, and a serverside script, i am making a “fuse item” gui, when i was debugging the code with prints, i noticed that, the localscript says that resulttype is “Weapons” (thats what i want it to be) and the server script, says that resulttype is “DestruidorDeHaters” (my roblox name) is there any way to fix?
Here is my server script:
game.Lighting.FuseItem.OnServerEvent:Connect(function(plr,result,resulttype,remove1,remove1type,remove2,remove2type,cost)
print(result)
print(resulttype)
plr[resulttype][result].Value = true
plr[remove1type][remove1].Value = false
plr[remove2type][remove2].Value = false
plr.Gold.Value = plr.Gold.Value - cost
end)
Here is my local script:
script.Parent.MouseButton1Click:Connect(function()
local plr = game.Players.LocalPlayer
if plr.Gold.Value >= script.Parent.Parent.Cost.Value then
if plr[script.Parent.Parent.Item1Type.Value][script.Parent.Parent.Item1.Value].Value == true and plr[script.Parent.Parent.Item2Type.Value][script.Parent.Parent.Item2.Value].Value == true then
local result = script.Parent.Parent.ResultName.Value
local resulttype = script.Parent.Parent.ResultType.Value
print(resulttype)
local remove1 = script.Parent.Parent.Item1.Value
local remove1type = script.Parent.Parent.Item1Type.Value
local remove2 = script.Parent.Parent.Item2.Value
local remove2type = script.Parent.Parent.Item2Type.Value
local cost = script.Parent.Parent.Cost.Value
game.Lighting.FuseItem:FireServer(plr,result,script.Parent.Parent.ResultType.Value,remove1,remove1type,remove2,remove2type,cost)
end
end
end)