#I need help with my simulator
13 messages · Page 1 of 1 (latest)
send the script here
what's the problem?
i cant grab item shoudl disapear and gimme 10 gems
** You are now Level 1! **
local Players = game:GetService("Players")
local Gem = script.Parent
local OriginalPosition = Gem.Position
Gem.Touched:Connect(function(touched)
if touched.Parent:IsA("Model") and touched.Parent:FindFirstChild("Humanoid") then
local Player = Players:GetPlayerFromCharacter(touched.Parent)
if Player then
local Leaderstats = player.leaderstats
local GemClone = Gem:Clone()
leaderstats.Gems.Value += 10
Gem:Destroy()
wait(10)
GemClone.Parent = workspace
GemClone.Position = OriginalPosition
end
end
end)
sorry didnt see message till now
i did
local Players = game:GetService("Players")
local Gem = script.Parent
local OriginalPosition = Gem.Position
Gem.Touched:Connect(function(touched)
if touched.Parent:IsA("Model") and touched.Parent:FindFirstChild("Humanoid") then
local Player = Players:GetPlayerFromCharacter(touched.Parent)
if Player then
local Leaderstats = player.leaderstats
local GemClone = Gem:Clone()
leaderstats.Gems.Value += 10
Gem:Destroy()
wait(10)
GemClone.Parent = workspace
GemClone.Position = OriginalPosition
end
end
end)