Rn im trying to make a bleach type game but i was just trying to make chat commands that will work but it isnt and i have no clue why
Script to make said values:
local service = game:GetService("DataStoreService")
local datastore = service:GetDataStore("Stats")
game.Players.PlayerAdded:Connect(function(player)
print'Joined'
local datafolder = Instance.new("Folder",player)
datafolder.Name = "Data Folder"
local fruitvalue = Instance.new("StringValue",datafolder)
fruitvalue.Name = "KeyWord"
local rad = math.random(1,2)
if rad == 1 then
fruitvalue.Value = "Unleash"
elseif rad == 2 then
fruitvalue.Value = "Go"
end
local dee = Instance.new("StringValue",datafolder)
dee.Name = "Zanpakuto"
local rad = math.random(1,2)
if rad == 1 then
dee.Value = "Zangetsu"
elseif rad == 2 then
dee.Value = "Sword"
end
wait(.1)
if not player:WaitForChild'Data Folder' then return end
print'loaded data folder'
end)
Chat command local script in starter player:
local plr = game.Players.LocalPlayer
local key = plr.Data.KeyWord.Value
local sword = plr.Data.Zanpakuto.Value
local debounce = false
plr.Chatted:Connect(function(msg)
if msg == key..", "..sword then
print("Shinkai")
end
end)

1 comment
Bruv i didnt even realise that man thanks so much im so lazy :(