#why is my code blind
1 messages · Page 1 of 1 (latest)
ServerStorage can not be accessed by the client
You need to use the replicated storage instead
ah, awesome
yeah it works ty
I know you got your question answered already but I’ll add more depth to it:
server storage is only available to the server and not the client, which is why you don’t see anything in it upon doing a test of the game, as it runs the client side.
wait... ServerSotorage... oh now im the moron
Things just take time to learn!!! :D
i still thing my mistake was pretty darn hillarious
If it makes you feel any better I once checked if a player was denounced only to clear it then reapply it the next line 😭
And was wondering why my debounce wasn’t working properly
Something like
if not player or debounce[player] then debounce[player] = nil return end
debounce[player] = true```
yeah no idea what that is
A debounce is basically a cooldown
local players = Game:GetService(“Players”)
local part = Workspace:WaitForChild(“Part”)
local debounce = {}
part.Touched:Connect(function(hit)
local char = hit.Parent
local player = players:GetPlayerFromCharacter(char)
if not player or debounce[player] then return end
debounce[player] = true
— insert other logic here maybe for collecting money idk
end)```
Too lazy to finish because I’m on mobile
But you get the idea
no i dont
Without a debounce, touching a part that’s supposed to give like 5 coins could give 15 due to multiple touches being triggered
lemme show you something
cool summary i guess
do you think i understand what a debounce is when my code looks like THIS?
You should learn what a debounce is :D
i suppose