So every remote ( Can't check beyond the 13th line ), Works as of now. For some reason it wont fire, and it does print
local player = game.Players.LocalPlayer
local y
local name
game.ReplicatedStorage.Remotes:WaitForChild("onTouch").OnClientEvent:Connect(function(desc, cost, door)
script.Parent.Visible = true
script.Parent.Desc.Text = desc
y = cost
name = door
end)
script.Parent.Yes.MouseButton1Click:Connect(function()
game.ReplicatedStorage.Remotes:WaitForChild("Purchase"):FireServer(y, name)
print(y) -- The amount prints
print(name) -- The name of the door I want to delete posted
script.Parent.Visible = false
print("Yes button pressed")
end)
script.Parent.No.MouseButton1Down:Connect(function()
script.Parent.Visible = false
end)
game:GetService("ReplicatedStorage").Remotes:WaitForChild("areaHandler").OnClientEvent:Connect(function(door)
print("Area handler received")
print(door)
local i = workspace.Earth.Biomes.BiomeDoors[door]
i:Destroy()
end)
Here's where nothing happens, Between the remote firing, and it not received the OnServerEvent function
local DataStoreService = game:GetService("DataStoreService")
local myDataStore = DataStoreService:GetDataStore("myDataStore")
--local woodsAmount = 25000
game:GetService("ReplicatedStorage").Remotes.Purchase.OnServerEvent:Connect(function(player, cost, door)
print("Received the purchase remote firing")
local coinsDataStore = myDataStore:GetAsync(player.UserId.."-Coins")
if player.leaderstats["Coins"].Value >= cost then
player.leaderstats["Coins"].Value = player.leaderstats["Coins"].Value - cost
myDataStore:SetAsync(player.UserId.."-Coins", player.leaderstats["Coins"].Value)
print("Enough to purchase door and fired areahandler")
game.ReplicatedStorage.Remotes.areaHandler:FireClient(player, door)
else
warn("Not enough and areahandler did NOT fire")
end
end)
I have no clue if it's the remote or not, But it doesn't print "Received the purchase remote firing" I've tried a different remote, Different button functions, etc.. But the remote just wont fire. Yes the top script is a LocalScript in the gui, and the one below is a Server Script

1 comment
put a print before the event firing on the client