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

Im trying to make a local dialouge script that clones a tool but it does not work how fix?

Asked by 2 years ago
Edited 2 years ago

Every thing it works but the cloneing part. I know that cloning from within local scripts doesnt work so how do I fix this?

local button = script.Parent.Parent.Gatorade local gui = script.Parent.Parent.Parent local players = game:GetService("Players") local player = script.Parent.Parent.Parent.Parent.Parent local backpack = script.Parent.Parent.Parent.Parent.Parent.Backpack local gat = script.Parent.Parent.Parent.GatoradeEvent

button.MouseButton1Click:Connect(function() if player.leaderstats.Cash.Value >= 2 then local cash = player.leaderstats.Cash

    cash.Value = cash.Value - 2
    gat:Fire()
    print("gatfired")

end end)

0
Please post the section of the code that clones the tool please. Kingu_Criminal 205 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

You can try to add a remote event and fire it via the local script, then give the tool in a server script.

Ad

Answer this question