But the remover script are inside of the log. everything work with the print.
Iâm not understanding what youâre trying to say, did updateClientCurrenct print something when you clicked the log?
No, when i click on the log, nothing was print
Whatâs the full code in your Remover script?
local clickdetector = script.Parent.ClickDetector
clickdetector.MouseClick:Connect(function()
script.Parent:Destroy()
end)
Thatâs your issue, Put the code for giving the player currency and destroying of the logs in that remover script
1 Like
like that ?
local replicatedStorage = game:GetService("ReplicatedStorage")
local logs = game.ReplicatedStorage.Logs.Part1.ClickDetector
local DataStore = require(1936396537)
logs.MouseClick:Connect(function(player)
print("test2")
local currencyStore = DataStore("currency", player)
wait(0.2)
currencyStore:Increment(5000)
logs:Destroy()
end)
Yes, but some things need to be changed around, use this
local logs = script.Parent
local DataStore = require(1936396537)
logs.ClickDetector.MouseClick:Connect(function(player)
print("test2")
local currencyStore = DataStore("currency", player)
wait(0.2)
currencyStore:Increment(5000)
logs.Parent:Destroy()
end)
2 Likes
YESSSSSSSSS Thank you man! ITS WORKING ! Thank you a lot man, really, for your time
1 Like
Anytime! If you have anymore issues donât be afraid to make another post!
1 Like