That script works but the local script won’t print
here is my entire local script
—Varibles—
local money = 0
local shopframe = game.Workspace.House.Shop.SurfaceGui.Frame
local Newpositon = game.Workspace.House.Newshop.CFrame
local oldposition = CFrame.new(-17.6289692, 4.67552853, 20.9015789, 1, -0, 0, 0, 0.984812498, 0.173621148, -0, -0.173621148, 0.984812498)
local Tweenservice = game:GetService(“TweenService”)
local shop = game.Workspace.House.Shop
local partTween = Tweenservice:Create(shop, TweenInfo.new(2, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out, 0, false, 0), { Size = Vector3.new(7, 4, 0.3), CFrame = Newpositon})
local partTweenreverse = Tweenservice:Create(shop, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0), { Size = Vector3.new(3, 1.6, 0.3), CFrame = oldposition})
—Code—
for i, v in pairs(game.Workspace.House.Laptop:GetChildren()) do
local clickdetecter = Instance.new(“ClickDetector”)
clickdetecter.Parent = v
v.ClickDetector.MouseClick:Connect(function()
partTween:Play()
shopframe.Visible = true
end)
end
game.Workspace.House.Shop.SurfaceGui.Frame.Close.MouseButton1Click:Connect(function()
partTweenreverse:Play()
wait(0.2)
shop.SurfaceGui.Frame.Visible = false
end)
while true do
wait()
script.Parent.ScreenGui[“Money gui”].Text = "$: "…money
end
game.ReplicatedStorage[“Money transfer”].OnClientEvent:Connect(function()
money += 1
print(“Message received”)
end)